22using Test: @test , @testset , @test_broken
33using NDTensors. DiagonalArrays: DiagonalArrays, DiagonalArray, DiagonalMatrix, diaglength
44using NDTensors. SparseArrayDOKs: SparseArrayDOK
5- using NDTensors. SparseArrayInterface: nstored
5+ using NDTensors. SparseArrayInterface: stored_length
66@testset " Test NDTensors.DiagonalArrays" begin
77 @testset " README" begin
88 @test include (
@@ -31,15 +31,15 @@ using NDTensors.SparseArrayInterface: nstored
3131 # TODO : Use `densearray` to make generic to GPU.
3232 @test Array (a_dest) ≈ Array (a1) * Array (a2)
3333 # TODO : Make this work with `ArrayLayouts`.
34- @test nstored (a_dest) == 2
34+ @test stored_length (a_dest) == 2
3535 @test a_dest isa DiagonalMatrix{elt}
3636
3737 # TODO : Make generic to GPU, use `allocate_randn`?
3838 a2 = randn (elt, (3 , 4 ))
3939 a_dest = a1 * a2
4040 # TODO : Use `densearray` to make generic to GPU.
4141 @test Array (a_dest) ≈ Array (a1) * Array (a2)
42- @test nstored (a_dest) == 8
42+ @test stored_length (a_dest) == 8
4343 @test a_dest isa Matrix{elt}
4444
4545 a2 = SparseArrayDOK {elt} (3 , 4 )
@@ -51,7 +51,7 @@ using NDTensors.SparseArrayInterface: nstored
5151 @test Array (a_dest) ≈ Array (a1) * Array (a2)
5252 # TODO : Define `SparseMatrixDOK`.
5353 # TODO : Make this work with `ArrayLayouts`.
54- @test nstored (a_dest) == 2
54+ @test stored_length (a_dest) == 2
5555 @test a_dest isa SparseArrayDOK{elt,2 }
5656 end
5757 end
0 commit comments