diff --git a/Project.toml b/Project.toml index 96944c68..8335dc93 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BlockSparseArrays" uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4" authors = ["ITensor developers and contributors"] -version = "0.2.19" +version = "0.2.20" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" @@ -38,7 +38,7 @@ DiagonalArrays = "0.2.2" Dictionaries = "0.4.3" FillArrays = "1.13.0" GPUArraysCore = "0.1.0, 0.2" -GradedUnitRanges = "0.1.0" +GradedUnitRanges = "0.2.0" LabelledNumbers = "0.1.0" LinearAlgebra = "1.10" MacroTools = "0.5.13" diff --git a/test/test_gradedunitrangesext.jl b/test/test_gradedunitrangesext.jl index 1f76c9d9..dfe4fd98 100644 --- a/test/test_gradedunitrangesext.jl +++ b/test/test_gradedunitrangesext.jl @@ -5,14 +5,7 @@ using BlockArrays: using BlockSparseArrays: BlockSparseArray, BlockSparseMatrix, BlockSparseVector, blockstoredlength using GradedUnitRanges: - GradedUnitRanges, - GradedOneTo, - GradedUnitRange, - GradedUnitRangeDual, - blocklabels, - dual, - gradedrange, - isdual + GradedUnitRanges, GradedOneTo, GradedUnitRange, blocklabels, dual, gradedrange, isdual using LabelledNumbers: label using SparseArraysBase: storedlength using SymmetrySectors: U1 @@ -216,8 +209,8 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @test blockstoredlength(b) == 2 @test Array(b) == 2 * Array(a) for i in 1:2 - @test axes(b, i) isa GradedUnitRangeDual - @test axes(a[:, :], i) isa GradedUnitRangeDual + @test isdual(axes(b, i)) + @test isdual(axes(a[:, :], i)) end I = [Block(1)[1:1]] @test a[I, :] isa AbstractBlockArray @@ -241,8 +234,8 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @test blockstoredlength(b) == 2 @test Array(b) == 2 * Array(a) for i in 1:2 - @test axes(b, i) isa GradedUnitRangeDual - @test axes(a[:, :], i) isa GradedUnitRangeDual + @test isdual(axes(b, i)) + @test isdual(axes(a[:, :], i)) end I = [Block(1)[1:1]] @@ -340,7 +333,7 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @test iszero(b[Block(2, 1)]) @test iszero(b[Block(1, 2)]) @test b[Block(2, 2)] == a2 - @test all(GradedUnitRanges.space_isequal.(axes(b), (r, dual(r)))) + @test all(GradedUnitRanges.labelled_isequal.(axes(b), (r, dual(r)))) # Regression test for Vector, which caused # an ambiguity error with Base. @@ -354,7 +347,7 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @test blockstoredlength(b) == 1 @test b[Block(1)] == a1 @test iszero(b[Block(2)]) - @test all(GradedUnitRanges.space_isequal.(axes(b), (r,))) + @test all(GradedUnitRanges.labelled_isequal.(axes(b), (r,))) # Regression test for BitArray r = gradedrange([U1(0) => 2, U1(1) => 3]) @@ -369,7 +362,7 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64}) @test iszero(b[Block(2, 1)]) @test iszero(b[Block(1, 2)]) @test b[Block(2, 2)] == a2 - @test all(GradedUnitRanges.space_isequal.(axes(b), (r, dual(r)))) + @test all(GradedUnitRanges.labelled_isequal.(axes(b), (r, dual(r)))) end end end