-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature request: Decompositions for Unitful matrices #1114
Comments
For background, there's a lengthy discussion in PainterQubits/Unitful.jl#46 |
https://github.com/anonymous-shrew/UnitfulTensors.jl. I haven't used it, but it looks like it has the right design. You can't do matrix algebra operations unless a matrix's units are of the form |
Concretely typed Unitful matrices/vectors have the same units for each element. This is a common case that would be nice to support, and it doesn't require any of the more involved packages. AFAIU, UnitfulTensors.jl is only needed when one needs different units for rows/columns. |
See also #128 and the linked issues |
@timholy : Just to give additional context: This ask arose from an optimization routine where the matrix construction and decomposition is an implementation detail; the objective function F(x) can have dimensions in both arguments and output yielding a dimensioned matrix. Obviously I could request the user use UnitfulTensors.jl, but your package is the most popular, and it does seem reasonable to see how far the generic code can be pushed before making a user request. Personally, I also find writing the optimization routines easier if I can test it with dimensioned quantities-speed be damned if need be. |
To reproduce:
It appears that there are a few methods in the
LinearAlgebra
package which are fine with Unitful matrices (likeDiagonal, transpose, Adjoint
), butLU, Cholesky
, andsvd
do not support it.The text was updated successfully, but these errors were encountered: