We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b3c199 commit 6998f5eCopy full SHA for 6998f5e
src/factorizations/truncation.jl
@@ -282,9 +282,8 @@ MAK.truncation_error(values::SectorDict, ind) =
282
MAK.truncation_error!(SectorDict(c => copy(v) for (c, v) in values), ind)
283
284
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
+ for (c, ind_c) in ind
+ v = values[c]
288
v[ind_c] .= zero(eltype(v))
289
end
290
return TensorKit._norm(values, 2, zero(real(eltype(valtype(values)))))
0 commit comments