@@ -691,31 +691,21 @@ using .NDTensorsTestUtils: devices_list, is_supported_eltype
691
691
c = @view b[4 : 8 , 4 : 8 ]
692
692
@test c isa SubArray{<: Any ,<: Any ,<: BlockSparseArray }
693
693
@test size (c) == (5 , 5 )
694
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
695
- @test block_nstored (c) == 2 broken = VERSION > v " 1.11-"
694
+ @test block_nstored (c) == 2
696
695
@test blocksize (c) == (2 , 2 )
697
696
@test blocklengths .(axes (c)) == ([2 , 3 ], [2 , 3 ])
698
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
699
- @test size (c[Block (1 , 1 )]) == (2 , 2 ) broken = VERSION ≥ v " 1.11-"
700
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
701
- @test c[Block (1 , 1 )] == a[Block (2 , 2 )[2 : 3 , 2 : 3 ]] broken = VERSION ≥ v " 1.11-"
702
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
703
- @test size (c[Block (2 , 2 )]) == (3 , 3 ) broken = VERSION ≥ v " 1.11-"
704
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
705
- @test c[Block (2 , 2 )] == a[Block (1 , 1 )[1 : 3 , 1 : 3 ]] broken = VERSION ≥ v " 1.11-"
706
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
707
- @test size (c[Block (2 , 1 )]) == (3 , 2 ) broken = VERSION ≥ v " 1.11-"
708
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
709
- @test iszero (c[Block (2 , 1 )]) broken = VERSION ≥ v " 1.11-"
710
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
711
- @test size (c[Block (1 , 2 )]) == (2 , 3 ) broken = VERSION ≥ v " 1.11-"
712
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
713
- @test iszero (c[Block (1 , 2 )]) broken = VERSION ≥ v " 1.11-"
697
+ @test size (c[Block (1 , 1 )]) == (2 , 2 )
698
+ @test c[Block (1 , 1 )] == a[Block (2 , 2 )[2 : 3 , 2 : 3 ]]
699
+ @test size (c[Block (2 , 2 )]) == (3 , 3 )
700
+ @test c[Block (2 , 2 )] == a[Block (1 , 1 )[1 : 3 , 1 : 3 ]]
701
+ @test size (c[Block (2 , 1 )]) == (3 , 2 )
702
+ @test iszero (c[Block (2 , 1 )])
703
+ @test size (c[Block (1 , 2 )]) == (2 , 3 )
704
+ @test iszero (c[Block (1 , 2 )])
714
705
715
706
x = randn (elt, 3 , 3 )
716
707
c[Block (2 , 2 )] = x
717
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
718
- @test c[Block (2 , 2 )] == x broken = VERSION ≥ v " 1.11-"
708
+ @test c[Block (2 , 2 )] == x
719
709
@test a[Block (1 , 1 )[1 : 3 , 1 : 3 ]] == x
720
710
721
711
a = BlockSparseArray {elt} ([2 , 3 ], [3 , 4 ])
@@ -776,17 +766,13 @@ using .NDTensorsTestUtils: devices_list, is_supported_eltype
776
766
@test copy (b) == a[J, J]
777
767
@test blocksize (b) == (2 , 2 )
778
768
@test blocklengths .(axes (b)) == ([4 , 4 ], [4 , 4 ])
779
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
780
- @test b[Block (1 , 1 )] == Array (a)[[7 , 8 , 5 , 6 ], [7 , 8 , 5 , 6 ]] broken =
781
- VERSION ≥ v " 1.11-"
769
+ @test b[Block (1 , 1 )] == Array (a)[[7 , 8 , 5 , 6 ], [7 , 8 , 5 , 6 ]]
782
770
c = @views b[Block (1 , 1 )][2 : 3 , 2 : 3 ]
783
771
@test c == Array (a)[[8 , 5 ], [8 , 5 ]]
784
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
785
- @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]] broken = VERSION ≥ v " 1.11-"
772
+ @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]]
786
773
c = @view b[Block (1 , 1 )[2 : 3 , 2 : 3 ]]
787
774
@test c == Array (a)[[8 , 5 ], [8 , 5 ]]
788
- # TODO : Fix in Julia 1.11 (https://github.com/ITensor/ITensors.jl/pull/1539).
789
- @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]] broken = VERSION ≥ v " 1.11-"
775
+ @test copy (c) == Array (a)[[8 , 5 ], [8 , 5 ]]
790
776
end
791
777
792
778
# TODO : Add more tests of this, it may
0 commit comments