diff --git a/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl b/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl index 1bc47b330b..53c883bf54 100644 --- a/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl +++ b/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl @@ -60,8 +60,7 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @test blocksize(b) == (2, 2, 2, 2) @test blocklengths.(axes(b)) == ([2, 2], [2, 2], [2, 2], [2, 2]) @test nstored(b) == 256 - # TODO: Fix this for `BlockedArray`. - @test_broken block_nstored(b) == 16 + @test block_nstored(b) == 16 for i in 1:ndims(a) @test axes(b, i) isa BlockedOneTo{Int} end diff --git a/NDTensors/src/lib/BlockSparseArrays/src/blocksparsearrayinterface/blocksparsearrayinterface.jl b/NDTensors/src/lib/BlockSparseArrays/src/blocksparsearrayinterface/blocksparsearrayinterface.jl index 182504e038..732a895286 100644 --- a/NDTensors/src/lib/BlockSparseArrays/src/blocksparsearrayinterface/blocksparsearrayinterface.jl +++ b/NDTensors/src/lib/BlockSparseArrays/src/blocksparsearrayinterface/blocksparsearrayinterface.jl @@ -305,5 +305,4 @@ function blocksparse_blocks( end using BlockArrays: BlocksView -# TODO: Is this correct in general? -SparseArrayInterface.nstored(a::BlocksView) = 1 +SparseArrayInterface.nstored(a::BlocksView) = length(a)