From 9ca03be4a3372b69e941fb498e249e7e891d5441 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Sat, 8 Jun 2019 12:52:17 +0200 Subject: [PATCH] Remove copy(::SubArray) definition from SparseArrays, fixes #32213. This method was introduced in #30552, but was unrelated to the rest of the changes, and no-one reviewed or though about the implications. --- stdlib/SparseArrays/src/sparseconvert.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/stdlib/SparseArrays/src/sparseconvert.jl b/stdlib/SparseArrays/src/sparseconvert.jl index bdadc3a4729ff..9f4bb6cd452f1 100644 --- a/stdlib/SparseArrays/src/sparseconvert.jl +++ b/stdlib/SparseArrays/src/sparseconvert.jl @@ -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.