-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sparse constructor when Tridiagonal
/SymTridiagonal
are empty
#42574
Fix sparse constructor when Tridiagonal
/SymTridiagonal
are empty
#42574
Conversation
Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Added a fix and tests for the 1x1 case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's construct the SparseMatrixCSC
directly also in the m=1
case. While you're at it, could you please fix the new line 659 by
SparseMatrixCSC(m, m, Vector(Ti(1):Ti(m+1)), Vector(Ti(1):Ti(m)), Vector{Tv}(D.diag))
otherwise it doesn't respect the index type Ti
.
Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Fixed. Added a test for the |
…uliaLang#42574) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
…uliaLang#42574) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
This should be backported to v1.6. |
Constructing a sparse matrix from empty structured matrices works for some, but not all, structured matrix types. This PR fixes the cases of
Tridiagonal
andSymTridiagonal
.Diagonal
andBidiagonal
already work as expected.Currently:
This PR: