Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing similar methods for annotated sparse matrices #19016

Closed
Sacha0 opened this issue Oct 18, 2016 · 3 comments
Closed

Missing similar methods for annotated sparse matrices #19016

Sacha0 opened this issue Oct 18, 2016 · 3 comments
Labels

Comments

@Sacha0
Copy link
Member

Sacha0 commented Oct 18, 2016

similar appears to lack three-argument methods for annotated sparse matrices:

julia> VERSION
v"0.6.0-dev.987"

julia> typeof(similar(Symmetric(speye(4)), Float64, (4,4)))
Array{Float64,2}

julia> @which(similar(Symmetric(speye(4)), Float64, (4,4)))
similar{T,N}(a::AbstractArray, ::Type{T}, dims::Tuple{Vararg{Int64,N}}) at abstractarray.jl:422

julia> # abstractarray.jl:422 returns an Array

julia> typeof(similar(Hermitian(speye(4)), Float64, (4,4)))
Array{Float64,2}

julia> @which(similar(Hermitian(speye(4)), Float64, (4,4)))
similar{T,N}(a::AbstractArray, ::Type{T}, dims::Tuple{Vararg{Int64,N}}) at abstractarray.jl:422

julia> typeof(similar(LowerTriangular(speye(4)), Float64, (4,4)))
Array{Float64,2}

julia> @which(similar(LowerTriangular(speye(4)), Float64, (4,4)))
similar{T,N}(a::AbstractArray, ::Type{T}, dims::Tuple{Vararg{Int64,N}}) at abstractarray.jl:422

Best!

@Sacha0 Sacha0 added the domain:arrays:sparse Sparse arrays label Oct 18, 2016
@andreasnoack
Copy link
Member

Should probably call similar on the underlying array.

@fredrikekre
Copy link
Member

Fixed by #24163 and #24162

@Sacha0
Copy link
Member Author

Sacha0 commented Oct 23, 2017

Hah, I'd forgotten filing this issue! Thanks for closing this @fredrikekre! :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants