Skip to content

Commit

Permalink
Remove inconsistent methods which are supposed to return
Browse files Browse the repository at this point in the history
a SparseMatrixCSC, but would not.
See JuliaSparse#265 (comment)
  • Loading branch information
j-fu committed Jun 1, 2023
1 parent 0a998b1 commit bf83a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,11 @@ function Base.sizehint!(S::SparseMatrixCSC, n::Integer)
end

# converting between SparseMatrixCSC types
SparseMatrixCSC(S::AbstractSparseMatrixCSC) = copy(S)

AbstractMatrix{Tv}(A::AbstractSparseMatrixCSC) where {Tv} = SparseMatrixCSC{Tv}(A)
SparseMatrixCSC{Tv}(S::AbstractSparseMatrixCSC{Tv}) where {Tv} = copy(S)
SparseMatrixCSC{Tv}(S::AbstractSparseMatrixCSC) where {Tv} = SparseMatrixCSC{Tv,eltype(getcolptr(S))}(S)
SparseMatrixCSC{Tv,Ti}(S::AbstractSparseMatrixCSC{Tv,Ti}) where {Tv,Ti} = copy(S)

function SparseMatrixCSC{Tv,Ti}(S::AbstractSparseMatrixCSC) where {Tv,Ti}
eltypeTicolptr = Vector{Ti}(getcolptr(S))
eltypeTirowval = Vector{Ti}(rowvals(S))
Expand Down

0 comments on commit bf83a7c

Please sign in to comment.