Skip to content

Commit

Permalink
schur: revert to throwing an error on nonconvergence
Browse files Browse the repository at this point in the history
since the code errors anyways, but this way we know why
  • Loading branch information
axsk committed Feb 23, 2021
1 parent 0d4ffb6 commit 61c2f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmdtools/analysis/schur.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def krylovschur(A, n, massmatrix=None, onseperation=DEFAULT_ONSEPERATION, which=
raise NotImplementedError("the choice of `which` is not supported")
E.solve()
if E.getConverged() < n:
warnings.warn("Schur decomposition did not converge, consider more iterations or less precision")
raise RuntimeError("Schur decomposition did not converge, consider more 'maxiter' or a higher 'tolerance'")
X = np.column_stack([x.array for x in E.getInvariantSubspace()])
return X[:, :n]

Expand Down

0 comments on commit 61c2f6a

Please sign in to comment.