Skip to content

Commit 6998f5e

Browse files
committed
simplify truncationerror implementation
1 parent 1b3c199 commit 6998f5e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/factorizations/truncation.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,8 @@ MAK.truncation_error(values::SectorDict, ind) =
282282
MAK.truncation_error!(SectorDict(c => copy(v) for (c, v) in values), ind)
283283

284284
function MAK.truncation_error!(values::SectorDict, ind)
285-
for (c, v) in values
286-
ind_c = get(ind, c, nothing)
287-
isnothing(ind_c) && continue
285+
for (c, ind_c) in ind
286+
v = values[c]
288287
v[ind_c] .= zero(eltype(v))
289288
end
290289
return TensorKit._norm(values, 2, zero(real(eltype(valtype(values)))))

0 commit comments

Comments
 (0)