-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Automatically up-convert eltype in SPQR #33601
Conversation
stdlib/SuiteSparse/src/spqr.jl
Outdated
"sparse floating point QR using SPQR or qr(Array(A)) for generic ", | ||
"dense QR."))) | ||
LinearAlgebra.qr(A::SparseMatrixCSC; tol=_default_tol(A)) = qr(float(A); tol=tol) | ||
# function LinearAlgebra.qr(A::SparseMatrixCSC; tol=_default_tol(A)) |
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.
Should this one be deleted?
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.
Yes, this was just a placeholder in case we decide not to upconvert but to error. I'll delete this then and merge.
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.
LGTM (just the question about the function that is commented out)
I'll also add a short comment to the !!!note docstring, something like
Or any other suggestion? |
This intends to close #33425, one way or another.
I realized that we do up-convert in the other two sparse factorizations, UMFPACK and CHOLMOD, and this is clearly documented. So one option is to do the same with SPQR. Another option that we discussed over at #33425 is to throw an error message.
The previous line below the docstring was calling a non-existent method, so I moved the main workhorse below the docstring, adapted the conversion functions from UMFPACK, and added a "!!! note" (maybe it should be a compat annotation?).