From 12fd2de47e410cb06b7268764713f6894bc75474 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Sun, 9 Jun 2019 15:24:44 +0200 Subject: [PATCH] Remove copy(::SubArray) definition from SparseArrays, fixes #32213. (#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 5d02c59185ef31703891adc748e0ed414a9a5b3f) --- 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.