Skip to content

Commit

Permalink
Avoid Block method ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Oct 6, 2023
1 parent 0b8b04b commit ef53e47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions NDTensors/src/BlockSparseArrays/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test
using NDTensors.BlockSparseArrays
using BlockArrays
using BlockArrays: BlockArrays

@testset "Test NDTensors.BlockSparseArrays" begin
@testset "README" begin
Expand All @@ -11,11 +11,11 @@ using BlockArrays
) isa Any
end
@testset "Mixed block test" begin
blocks = [Block(1, 1), Block(2, 2)]
blocks = [BlockArrays.Block(1, 1), BlockArrays.Block(2, 2)]
block_data = [randn(2, 2)', randn(3, 3)]
inds = ([2, 3], [2, 3])
A = BlockSparseArray(blocks, block_data, inds)
@test A[Block(1, 1)] == block_data[1]
@test A[Block(1, 2)] == zeros(2, 3)
@test A[BlockArrays.Block(1, 1)] == block_data[1]
@test A[BlockArrays.Block(1, 2)] == zeros(2, 3)
end
end

0 comments on commit ef53e47

Please sign in to comment.