Skip to content

Commit bf83a7c

Browse files
committed
Remove inconsistent methods which are supposed to return
a SparseMatrixCSC, but would not. See #265 (comment)
1 parent 0a998b1 commit bf83a7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sparsematrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,11 +750,11 @@ function Base.sizehint!(S::SparseMatrixCSC, n::Integer)
750750
end
751751

752752
# converting between SparseMatrixCSC types
753-
SparseMatrixCSC(S::AbstractSparseMatrixCSC) = copy(S)
753+
754754
AbstractMatrix{Tv}(A::AbstractSparseMatrixCSC) where {Tv} = SparseMatrixCSC{Tv}(A)
755755
SparseMatrixCSC{Tv}(S::AbstractSparseMatrixCSC{Tv}) where {Tv} = copy(S)
756756
SparseMatrixCSC{Tv}(S::AbstractSparseMatrixCSC) where {Tv} = SparseMatrixCSC{Tv,eltype(getcolptr(S))}(S)
757-
SparseMatrixCSC{Tv,Ti}(S::AbstractSparseMatrixCSC{Tv,Ti}) where {Tv,Ti} = copy(S)
757+
758758
function SparseMatrixCSC{Tv,Ti}(S::AbstractSparseMatrixCSC) where {Tv,Ti}
759759
eltypeTicolptr = Vector{Ti}(getcolptr(S))
760760
eltypeTirowval = Vector{Ti}(rowvals(S))

0 commit comments

Comments
 (0)