File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11name = " TensorProducts"
22uuid = " decf83d6-1968-43f4-96dc-fdb3fe15fc6d"
33authors = [" ITensor developers <support@itensor.org> and contributors" ]
4- version = " 0.1.5 "
4+ version = " 0.1.6 "
55
66[weakdeps ]
77BlockArrays = " 8e7c35d0-a365-5155-bbbb-fb81a777f24e"
Original file line number Diff line number Diff line change @@ -5,3 +5,6 @@ struct OneToOne{T} <: AbstractUnitRange{T} end
55OneToOne () = OneToOne {Int} ()
66Base. first (a:: OneToOne ) = one (eltype (a))
77Base. last (a:: OneToOne ) = one (eltype (a))
8+
9+ # impose Int64 to keep Base.to_shape(::Base.OneTo) convention
10+ Base. to_shape (:: OneToOne ) = 1
Original file line number Diff line number Diff line change @@ -12,4 +12,6 @@ using TensorProducts: OneToOne
1212 @test length (a0) == 1
1313
1414 @test blockaxes (OneToOne ()) == (BlockRange (OneToOne ()),)
15+ @test Base. to_shape (OneToOne ()) isa Int64
16+ @test Base. to_shape (OneToOne ()) == 1
1517end
You can’t perform that action at this time.
0 commit comments