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.
  • Loading branch information
fredrikekre authored and KristofferC committed Jun 9, 2019
1 parent 7bdba87 commit 5d02c59
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

1 comment on commit 5d02c59

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

Please sign in to comment.