@@ -1239,13 +1239,16 @@ function vcat(X1::_SparseConcatGroup, X::_SparseConcatGroup...)
12391239    end 
12401240    return  Base. typed_vcat (Base. promote_eltype (X1, X... ), X1, X... )
12411241end 
1242- function  hvcat (rows:: Tuple{Vararg{Int}} , X1:: _SparseConcatGroup , X:: _SparseConcatGroup... )
1242+ function  hvcat_internal (rows:: Tuple{Vararg{Int}} , X1:: _SparseConcatGroup , X:: _SparseConcatGroup... )
12431243    if  anysparse (X1) ||  anysparse (X... )
12441244        vcat (_hvcat_rows (rows, X1, X... )... )
12451245    else 
12461246        Base. typed_hvcat (Base. promote_eltypeof (X1, X... ), rows, X1, X... )
12471247    end 
12481248end 
1249+ function  hvcat (rows:: Tuple{Vararg{Int}} , X1:: _SparseConcatGroup , X:: _SparseConcatGroup... )
1250+     return  hvcat_internal (rows, X1, X... )
1251+ end 
12491252function  _hvcat_rows ((row1, rows... ):: Tuple{Vararg{Int}} , X:: _SparseConcatGroup... )
12501253    if  row1 ≤  0 
12511254        throw (ArgumentError (" length of block row must be positive, got $row1 " 
@@ -1266,9 +1269,8 @@ hcat(n1::Number, ns::Vararg{Number}) = invoke(hcat, Tuple{Vararg{Number}}, n1, n
12661269vcat (n1:: Number , ns:: Vararg{Number} ) =  invoke (vcat, Tuple{Vararg{Number}}, n1, ns... )
12671270hcat (n1:: N , ns:: Vararg{N} ) where  {N<: Number } =  invoke (hcat, Tuple{Vararg{N}}, n1, ns... )
12681271vcat (n1:: N , ns:: Vararg{N} ) where  {N<: Number } =  invoke (vcat, Tuple{Vararg{N}}, n1, ns... )
1269- hvcat (rows:: Tuple{Vararg{Int}} , n1:: Number , ns:: Vararg{Number} ) =  invoke (hvcat, Tuple{typeof (rows), Vararg{Number}}, rows, n1, ns... )
1270- hvcat (rows:: Tuple{Vararg{Int}} , n1:: N , ns:: Vararg{N} ) where  {N<: Number } =  invoke (hvcat, Tuple{typeof (rows), Vararg{N}}, rows, n1, ns... )
1271- 
1272+ hvcat (rows:: Tuple{Vararg{Int}} , n1:: Number , ns:: Vararg{Number} ) =  hvcat_internal (rows, n1, ns... )
1273+ hvcat (rows:: Tuple{Vararg{Int}} , n1:: N , ns:: Vararg{N} ) where  {N<: Number } =  hvcat_internal (rows, n1, ns... )
12721274
12731275#  make sure UniformScaling objects are converted to sparse matrices for concatenation
12741276promote_to_array_type (A:: Tuple{Vararg{Union{_SparseConcatGroup,UniformScaling}}} ) =  anysparse (A... ) ?  SparseMatrixCSC :  Matrix
0 commit comments