We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94249da commit cb46917Copy full SHA for cb46917
stdlib/SparseArrays/test/sparse.jl
@@ -1138,6 +1138,18 @@ end
1138
S[I] .= J
1139
@test sum(S) == (sumS1 - sumS2 + sum(J))
1140
end
1141
+
1142
+ # setindex with a Matrix{Bool}
1143
+ Is = fill(false, 10, 10)
1144
+ Is[1, 1] = true
1145
+ Is[10, 10] = true
1146
+ A = sprand(10, 10, 0.2)
1147
+ A[Is] = [0.1, 0.5]
1148
+ @test A[1, 1] == 0.1
1149
+ @test A[10, 10] == 0.5
1150
+ A = spzeros(10, 10)
1151
1152
+ @test nnz(A) == 2
1153
1154
1155
@testset "dropstored!" begin
0 commit comments