Skip to content

Commit 7cc9316

Browse files
committed
add missing argument
1 parent bff9b9d commit 7cc9316

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/factorizations/truncation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ end
145145
# Find truncation
146146
# ---------------
147147
# auxiliary functions
148-
rtol_to_atol(S, p, atol, rtol) = rtol > 0 ? max(atol, TensorKit._norm(S, p) * rtol) : atol
148+
rtol_to_atol(S, p, atol, rtol) =
149+
rtol == 0 ? atol : max(atol, TensorKit._norm(S, p, norm(zero(scalartype(valtype(S))))) * rtol)
149150

150151
function _compute_truncerr(Σdata, truncdim, p = 2)
151152
I = keytype(Σdata)

0 commit comments

Comments
 (0)