@@ -323,17 +323,25 @@ import Base.LinAlg: fillslots!, UnitLowerTriangular
323
323
Bidiagonal (randn (3 ), randn (2 ), rand ([:U ,:L ])),
324
324
SymTridiagonal (randn (3 ), randn (2 )),
325
325
sparse (randn (3 ,4 )),
326
- Diagonal (randn (5 )),
326
+ # Diagonal(randn(5)), # Diagonal fill! deprecated, see below
327
327
sparse (rand (3 )),
328
- LowerTriangular (randn (3 ,3 )),
329
- UpperTriangular (randn (3 ,3 ))
328
+ # LowerTriangular(randn(3,3)), # AbstractTriangular fill! deprecated, see below
329
+ # UpperTriangular(randn(3,3)) # AbstractTriangular fill! deprecated, see below
330
330
]
331
331
for A in exotic_arrays
332
332
fill! (A, 0 )
333
333
for a in A
334
334
@test a == 0
335
335
end
336
336
end
337
+ # Diagonal and AbstractTriangular fill! were defined as fillslots!,
338
+ # not matching the general behavior of fill!, and so have been deprecated.
339
+ # In a future dev cycle, these fill! methods should probably be reintroduced
340
+ # with behavior matching that of fill! for other structured matrix types.
341
+ # In the interm, equivalently test fillslots! below
342
+ @test iszero (fillslots! (Diagonal (fill (1 , 3 )), 0 ))
343
+ @test iszero (fillslots! (LowerTriangular (fill (1 , 3 , 3 )), 0 ))
344
+ @test iszero (fillslots! (UpperTriangular (fill (1 , 3 , 3 )), 0 ))
337
345
end
338
346
let # fill!(small, x)
339
347
val = randn ()
0 commit comments