Skip to content

vcat of matrices should not be in SparseArrays.jl #28234

@dlfivefifty

Description

@dlfivefifty

This feels like type piracy:

julia> @which vcat(randn(2,10), randn(2,10))
vcat(A::Union{Array{T,1}, Array{T,2}, Adjoint{T,Array{T,1}}, RowVector{T,Array{T,1}}, Transpose{T,Array{T,1}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Array{T,2} where T), Hermitian{T,A} where A<:(Array{T,2} where T), Symmetric{T,A} where A<:(Array{T,2} where T)}...) where T in SparseArrays at /Users/solver/Projects/julia7/usr/share/julia/stdlib/v0.7/SparseArrays/src/sparsevector.jl:1068

julia> @which hcat(randn(2,10), randn(2,10))
hcat(A::Union{Array{T,1}, Array{T,2}, Adjoint{T,Array{T,1}}, RowVector{T,Array{T,1}}, Transpose{T,Array{T,1}}, LinearAlgebra.AbstractTriangular{T,A} where A<:(Array{T,2} where T), Hermitian{T,A} where A<:(Array{T,2} where T), Symmetric{T,A} where A<:(Array{T,2} where T)}...) where T in SparseArrays at /Users/solver/Projects/julia7/usr/share/julia/stdlib/v0.7/SparseArrays/src/sparsevector.jl:1069

Note that the special case of vector is in Base:

 julia> @which vcat(randn(10), randn(10))
vcat(arrays::Array{T,1}...) where T in Base at array.jl:1532

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions