Skip to content

Commit 6df19ad

Browse files
committed
Make concatenation of vectors of matrices return dense matrix.
1 parent beab3b6 commit 6df19ad

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

base/array.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,8 @@ hcat{T}(A::Union{Matrix{T}, Vector{T}}...) = typed_hcat(T, A...)
731731
vcat(A::Union{Matrix, Vector}...) = typed_vcat(promote_eltype(A...), A...)
732732
vcat{T}(A::Union{Matrix{T}, Vector{T}}...) = typed_vcat(T, A...)
733733

734+
hvcat(rows::Tuple{Vararg{Int}}, xs::Vector...) = typed_hvcat(promote_eltype(xs...), rows, xs...)
735+
hvcat{T}(rows::Tuple{Vararg{Int}}, xs::Vector{T}...) = typed_hvcat(T, rows, xs...)
734736

735737
hvcat(rows::Tuple{Vararg{Int}}, xs::Matrix...) = typed_hvcat(promote_eltype(xs...), rows, xs...)
736738
hvcat{T}(rows::Tuple{Vararg{Int}}, xs::Matrix{T}...) = typed_hvcat(T, rows, xs...)

test/abstractarray.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,3 +612,8 @@ A = TSlowNIndexes(rand(2,2))
612612
@test @inferred(indices(rand(3,2), 1)) == 1:3
613613
@test @inferred(indices(rand(3,2), 2)) == 1:2
614614
@test @inferred(indices(rand(3,2), 3)) == 1:1
615+
616+
#17088
617+
let M = rand(10,10)
618+
@test !issparse([[M] [M];])
619+
end

0 commit comments

Comments
 (0)