Skip to content

Commit 9e90f78

Browse files
committed
factorisations test changes
1 parent 4fceb03 commit 9e90f78

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/tensors/factorizations.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ for V in spacelist
239239
@test isisometry(Vᴴ; side = :right)
240240

241241
# dimension of S is a float for IsingBimodule
242-
nvals = dim(domain(S)) ÷ 2
243-
eltype(nvals) <: AbstractFloat && (nvals = Int(nvals))
242+
nvals = round(Int, dim(domain(S)) / 2)
244243
trunc = truncrank(nvals)
245244
U1, S1, Vᴴ1 = @constinferred svd_trunc(t; trunc)
246245
@test t * Vᴴ1' U1 * S1
@@ -303,9 +302,7 @@ for V in spacelist
303302
@test @constinferred isposdef(vdv)
304303
t isa DiagonalTensorMap || @test !isposdef(t) # unlikely for non-hermitian map
305304

306-
nvals = dim(domain(t)) ÷ 2
307-
eltype(nvals) <: AbstractFloat && (nvals = Int(nvals))
308-
d, v = @constinferred eig_trunc(t; trunc = truncrank(nvals))
305+
nvals = round(Int, dim(domain(t)) / 2)
309306
@test t * v v * d
310307
@test dim(domain(d)) nvals
311308

0 commit comments

Comments
 (0)