Skip to content

Commit 30b3636

Browse files
dkarraschandreasnoack
authored andcommitted
fix test for sparse matrix assignment (#32756)
1 parent 46c9a77 commit 30b3636

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
@@ -103,7 +103,10 @@ do33 = fill(1.,3)
103103
end
104104

105105
@testset "Issue #30006" begin
106-
SparseMatrixCSC{Float64,Int32}(spzeros(3,3))[:, 1] == [1, 2, 3]
106+
A = SparseMatrixCSC{Float64,Int32}(spzeros(3,3))
107+
A[:, 1] = [1, 2, 3]
108+
@test nnz(A) == 3
109+
@test nonzeros(A) == [1, 2, 3]
107110
end
108111

109112
@testset "concatenation tests" begin

0 commit comments

Comments
 (0)