Closed ParadaCarleton closed 7 months ago
PR?
(Generally functions that dont call similar
need manual intervention to return a AbstractDimArray
. Just rebuild
may be enough, but not always. I dont use cholesky
so I dont know if both the dimension names remain meaningful - so its not implemented)
Generally functions that dont call
similar
need manual intervention to return aAbstractDimArray
.
Do you know if there's a good reason cholesky
(and perhaps other matrix factorizations) don't call similar
? If not, this should maybe be done in LinearAlgebra for greater generality.
I dont use cholesky so I dont know if both the dimension names remain meaningful - so its not implemented
My main use case for cholesky
is factorizing covariance matrices, where the dimension names are the same for both axes and stay meaningful. The useful property of cholesky
is that multiplying the Cholesky factor of the covariance by IID normal data gives you data with the correct covariance.
Might I suggest, before going through the work of overloading cholesky
for an AbstractDimArray
, can you construct a Cholesky
object with the types you want and show how you would then use it?
cholesky
doesnt call similar
because it returns a triangular matrix (cant remember which).
Its possible that wrapping that in a DimArray
will lose some dispatch optimisations.
cholesky doesnt call similar because it returns a triangular matrix (cant remember which).
It returns a wrapper around a triangular matrix, but the triangular matrix should be a DimArray. (I assume that’s possible? If not I’ll have to implement it when I have time.)
@ParadaCarleton this issue will wait forever on your MWE ;)
If it doesn't actually make sense after all, please close it because I'm not qualified to decide that either way.