Skip to content

Commit

Permalink
Remove copy(::SubArray) definition from SparseArrays, fixes #32213. (#…
Browse files Browse the repository at this point in the history
…32266)

This method was introduced in #30552, but was unrelated to the rest of
the changes, and no-one reviewed or though about the implications.

(cherry picked from commit 5d02c59)
  • Loading branch information
fredrikekre authored and KristofferC committed Jun 9, 2019
1 parent 05960a5 commit 12fd2de
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 12fd2de

Please sign in to comment.