Force SymTridiagonal to have consistent lengths#1569
Open
musoke wants to merge 10 commits intoJuliaLang:masterfrom
Open
Force SymTridiagonal to have consistent lengths#1569musoke wants to merge 10 commits intoJuliaLang:masterfrom
musoke wants to merge 10 commits intoJuliaLang:masterfrom
Conversation
It is possible to initialise SymTridiagonal with subdiagonal of length equal to the diagonal. This is inconsistent with Tridiagonal and Bidiagonal. Check the lengths and error if the subdiagonal's length is not 1 less than the diagonal's length. Remove tests for SymTridiagonal with length(ev) == length(dv). Fixes: JuliaLang#629
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1569 +/- ##
==========================================
- Coverage 94.33% 94.30% -0.03%
==========================================
Files 35 35
Lines 16007 16009 +2
==========================================
- Hits 15100 15098 -2
- Misses 907 911 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
musoke
commented
Apr 7, 2026
Author
|
I think this is ready for review. @andreasnoack, could you take a look? |
araujoms
reviewed
Apr 7, 2026
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.
#629 pointed out that is possible to initialise SymTridiagonal with subdiagonal of length equal to the diagonal. This is inconsistent with Tridiagonal and Bidiagonal.
Check the lengths and error if the subdiagonal's length is not 1 less than the diagonal's length.
Remove tests for SymTridiagonal with length(ev) == length(dv).
Todo:
len(dv) == len(ev)now errorslen(dv)==len(ev)I don't think that any changes are needed for dstemr. As far as I can tell from LAPACK exception thrown from
eigen(::SymTridiagonal)#1491,dstemris called viadstgr!. It already has checks in place for the lengths ofdeandev:LinearAlgebra.jl/src/lapack.jl
Lines 4043 to 4058 in 17325b7
Possible followups:
_evview, now thatevalways has the same length._evview