Skip to content

Commit 5285026

Browse files
kshyattKristofferC
authored andcommitted
Test copy for ReshapedArray of SparseMatrixCSC (#34420)
1 parent 6dd6adb commit 5285026

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/SparseArrays/test/sparse.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,4 +2823,11 @@ end
28232823
@test adjoint(B)*adjoint(complex.(A)) adjoint(Array(B)) * adjoint(Array(complex.(A)))
28242824
end
28252825

2826+
@testset "copy a ReshapedArray of SparseMatrixCSC" begin
2827+
A = sprand(20, 10, 0.2)
2828+
rA = reshape(A, 10, 20)
2829+
crA = copy(rA)
2830+
@test reshape(crA, 20, 10) == A
2831+
end
2832+
28262833
end # module

0 commit comments

Comments
 (0)