Skip to content

Commit be954d4

Browse files
dkarraschKristofferC
authored andcommitted
fix test for sparse matrix assignment (#32756)
(cherry picked from commit 30b3636)
1 parent 1005051 commit be954d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/SparseArrays/test/sparse.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ do33 = fill(1.,3)
9393
end
9494

9595
@testset "Issue #30006" begin
96-
SparseMatrixCSC{Float64,Int32}(spzeros(3,3))[:, 1] == [1, 2, 3]
96+
A = SparseMatrixCSC{Float64,Int32}(spzeros(3,3))
97+
A[:, 1] = [1, 2, 3]
98+
@test nnz(A) == 3
99+
@test nonzeros(A) == [1, 2, 3]
97100
end
98101

99102
@testset "concatenation tests" begin

0 commit comments

Comments
 (0)