File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ using BlockSparseArrays:
2222 BlockSparseMatrix,
2323 BlockSparseVector,
2424 BlockView,
25- blockstoredlength ,
25+ blockrange ,
2626 blockreshape,
27- eachblockstoredindex,
28- eachstoredblock,
27+ blockstoredlength,
2928 blockstype,
3029 blocktype,
30+ eachblockaxis,
31+ eachblockstoredindex,
32+ eachstoredblock,
3133 sparsemortar,
3234 view!
3335using GPUArraysCore: @allowscalar
Original file line number Diff line number Diff line change 1+ using BlockArrays: Block, blocklength
2+ using BlockSparseArrays: blockrange, eachblockaxis
3+ using Test: @test , @testset
4+
5+ @testset " blockrange" begin
6+ r = blockrange (AbstractUnitRange{Int}[Base. OneTo (3 ), 1 : 4 ])
7+ @test eachblockaxis (r) == [Base. OneTo (3 ), 1 : 4 ]
8+ @test eachblockaxis (r)[1 ] === Base. OneTo (3 )
9+ @test eachblockaxis (r)[2 ] === 1 : 4
10+ @test r[Block (1 )] == 1 : 3
11+ @test r[Block (2 )] == 4 : 7
12+ @test first (r) == 1
13+ @test last (r) == 7
14+ @test blocklength (r) == 2
15+ @test r == 1 : 7
16+ end
You can’t perform that action at this time.
0 commit comments