Skip to content

Commit 945c660

Browse files
committed
relax error criterion
1 parent 0c9f42d commit 945c660

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/factorizations/truncation.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ function MatrixAlgebraKit.truncate!(
9191
bVᴴ = Tuple(bI_Vᴴs[bVᴴ_id])
9292
Ṽᴴ[bVᴴ[1] - Block(I′), bVᴴ[2]] = view(Vᴴ, bVᴴ...)[mask, :]
9393

94-
bS_id = @something findfirst(x -> last(Tuple(x)) == Block(I), bI_Ss) error(
95-
"No S-block found for $I"
96-
)
97-
bS = Tuple(bI_Ss[bS_id])
98-
S̃[(bS .- Block(I′))...] = Diagonal(diagview(view(S, bS...))[mask])
94+
bS_id = findfirst(x -> last(Tuple(x)) == Block(I), bI_Ss)
95+
if !isnothing(bS_id)
96+
bS = Tuple(bI_Ss[bS_id])
97+
S̃[(bS .- Block(I′))...] = Diagonal(diagview(view(S, bS...))[mask])
98+
end
9999
end
100100

101101
return Ũ, S̃, Ṽᴴ

0 commit comments

Comments
 (0)