@@ -48,7 +48,7 @@ using SparseArraysBase:
4848 zero!
4949using Test: @test , @test_throws
5050
51- a = SparseArrayDOK {Float64} (2 , 2 )
51+ a = SparseArrayDOK {Float64} (undef, 2 , 2 )
5252````
5353
5454AbstractArray interface:
@@ -122,32 +122,32 @@ b = a[1:2, 2]
122122@test b == [12 , 0 ]
123123@test storedlength (b) == 1
124124
125- a = SparseArrayDOK {Float64} (2 , 2 )
125+ a = SparseArrayDOK {Float64} (undef, 2 , 2 )
126126a .= 2
127127for I in eachindex (a)
128128 @test a[I] == 2
129129end
130130@test storedlength (a) == length (a)
131131
132- a = SparseArrayDOK {Float64} (2 , 2 )
132+ a = SparseArrayDOK {Float64} (undef, 2 , 2 )
133133fill! (a, 2 )
134134for I in eachindex (a)
135135 @test a[I] == 2
136136end
137137@test storedlength (a) == length (a)
138138
139- a = SparseArrayDOK {Float64} (2 , 2 )
139+ a = SparseArrayDOK {Float64} (undef, 2 , 2 )
140140fill! (a, 0 )
141141@test iszero (a)
142142@test iszero (storedlength (a))
143143
144- a = SparseArrayDOK {Float64} (2 , 2 )
144+ a = SparseArrayDOK {Float64} (undef, 2 , 2 )
145145a[1 , 2 ] = 12
146146zero! (a)
147147@test iszero (a)
148148@test iszero (storedlength (a))
149149
150- a = SparseArrayDOK {Float64} (2 , 2 )
150+ a = SparseArrayDOK {Float64} (undef, 2 , 2 )
151151a[1 , 2 ] = 12
152152b = zero (a)
153153@test iszero (b)
0 commit comments