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 1
1
name = " TensorProducts"
2
2
uuid = " decf83d6-1968-43f4-96dc-fdb3fe15fc6d"
3
3
authors = [
" ITensor developers <[email protected] > and contributors" ]
4
- version = " 0.1.5 "
4
+ version = " 0.1.6 "
5
5
6
6
[weakdeps ]
7
7
BlockArrays = " 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
5
5
OneToOne () = OneToOne {Int} ()
6
6
Base. first (a:: OneToOne ) = one (eltype (a))
7
7
Base. 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
12
12
@test length (a0) == 1
13
13
14
14
@test blockaxes (OneToOne ()) == (BlockRange (OneToOne ()),)
15
+ @test Base. to_shape (OneToOne ()) isa Int64
16
+ @test Base. to_shape (OneToOne ()) == 1
15
17
end
You can’t perform that action at this time.
0 commit comments