Skip to content

Commit

Permalink
Remove copy(::SubArray) definition from SparseArrays, fixes #32213.
Browse files Browse the repository at this point in the history
This method was introduced in #30552, but was unrelated to the rest of
the changes, and no-one reviewed or though about the implications.
  • Loading branch information
fredrikekre committed Jun 9, 2019
1 parent 7bdba87 commit 9ca03be
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions stdlib/SparseArrays/src/sparseconvert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ For other types return A itself.
unwrap(A::Any) = A
unwrap(A::AbstractMatrix) = iswrsparse(A) ? convert(SparseMatrixCSC, A) : convert(Array, A)

import Base.copy
copy(A::SubArray{T,2}) where T = getindex(unwrap(parent(A)), A.indices...)

# For pure sparse matrices and vectors return A.
# For wrapped sparse matrices or vectors convert to SparseMatrixCSC.
# Handle nested wrappers properly.
Expand Down

0 comments on commit 9ca03be

Please sign in to comment.