Skip to content

Commit edf12b7

Browse files
committed
bug and test fixes
1 parent a4e6fd3 commit edf12b7

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/boundaries/corner/tensormacros.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ end
5959

6060
function _projectedge!(
6161
t_dst::T, t_src::T, ma::MA, mb::MB, u::UV, v::UV
62-
) where {T<:AbsTen{2,2},MA<:AbsTen{1,4},MB<:AbsTen{2,4},UV<:AbsTen{3,1}}
62+
) where {T<:AbsTen{2,2},MA<:AbsTen{1,4},MB<:AbsTen{4,1},UV<:AbsTen{3,1}}
6363
@tensoropt (
6464
k => 2,
6565
D1 => D,

src/networks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Base.firstindex(ct::CompositeTensor) = 1
5858
Base.lastindex(ct::CompositeTensor) = length(ct)
5959

6060
function Base.iterate(ct::CompositeTensor, state=1)
61-
state > length(ct) && nothing
61+
state > length(ct) && return nothing
6262
return getindex(ct, state), state + 1
6363
end
6464

test/networks.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88

99
t = TensorMap(rand, p * p', e * s * w' * n')
1010

11-
@test virtualspace(t) == domain(t)
11+
@test swapaxes(t) == permute(t, ((1, 2), (4, 3, 6, 5)))
12+
@test invertaxes(t) == permute(t, ((1, 2), (5, 6, 3, 4)))
1213

13-
@test swapaxes(t) == permute(t, (4, 3, 6, 5))
14-
@test invertaxes(t) == permutedom(t, (5, 6, 3, 4))
15-
16-
ct2 = CompositeTensor(t, t')
14+
ct = CompositeTensor(t, t')
1715

1816
@test ct[1] == ct[2]'
1917
@test @constinferred(first(ct)) === parent(@constinferred(last(ct)))
@@ -23,6 +21,6 @@
2321

2422
@test virtualspace(ct, 1) == e * e'
2523
@test virtualspace(ct, 2) == s * s'
26-
@test virtualspace(ct, 3) == w' * n
24+
@test virtualspace(ct, 3) == w' * w
2725
@test virtualspace(ct, 4) == n' * n
2826
end

0 commit comments

Comments
 (0)