Repository navigation
Conversation
… before howmany values
…olve on an invariant subspace
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #176 +/- ##
==========================================
+ Coverage 86.62% 87.24% +0.61%
==========================================
Files 36 35 -1
Lines 3919 3848 -71
==========================================
- Hits 3395 3357 -38
+ Misses 524 491 -33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lkdvos
reviewed
Oct 7, 2026
lkdvos
reviewed
Oct 8, 2026
| return s | ||
| end | ||
|
|
||
| # warning for a Krylov subspace that becomes invariant at a dimension `K < howmany` |
Collaborator
There was a problem hiding this comment.
I would also be okay with a more generic message with less logic, but that is just subjective:
Invariant subspace of dimension $K (up to requested tolerance `tol = $tol`), which is smaller than the number of requested values (`howmany = $howmany`): returning $K values.
The Krylov subspace does not capture degenerate vectors past its blocksize (`blocksize = $blocksize`).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the Krylov subspace becomes invariant at a dimension
K < howmany, e.g. because of degenerate eigenvalues or singular values,svdsolveandrealeigsolvethrew aBoundsError, and the other solvers reported the event in different ways. This PR makes all of them return theKvalues found with a single, uniform warning:Changes:
Bug fixes:
svdsolve(GKL) andrealeigsolvelimithowmanyto the factorization size, aseigsolveandschursolvealready did.Warnings:
Lanczos,BlockLanczos,Arnoldi,GolubYeandGKLemit the same invariant-subspace message, which says how many values are returned and that degenerate eigenvalues can be the cause:The final "stopped without convergence" warning is no longer emitted in this case, since all returned values are converged: it now compares
convergedwithmin(howmany, K)instead ofhowmany.BiArnoldiis left unchanged (it warns if either residual is small but only stops when both are).Docstrings:
eigsolve,realeigsolve,geneigsolveandsvdsolvestate thatvalsis shorter thanhowmanyin this case.Tests: new tests for
svdsolveandrealeigsolveon the example above; the three tests that expected two warnings (Lanczos,Arnoldi,BlockLanczoswithhowmany = n + 1) now expect a single one and check thatnvalues are returned.🤖 Generated with Claude Code