On 2012-10-29, Raniere Gaia Silva <[email protected]> wrote:
> Hi,
> I need to performe a (numerical) cholesky factorization of a sparse
> matrix (20x20) but I'm getting a error.
the error message is clear: there is no implementation for RDF matrices,
only for exact matrices. So you can do this for QQ, for instance.
This is of course a deficiency in Sage matrices. There are Cholesky
implementations available for RDF matrices from numpy, for instance,
it's just absense of proper hooks in Sage.
You can do the following as a workaround:
sage: import numpy as np
sage: D = matrix(RDF, 2, 2, [[1, 1],[1,2]])
sage: np.linalg.cholesky(D.numpy())
array([[ 1., 0.],
[ 1., 1.]])
sage:
you can get Sage matrix out of it, too:
sage: L=matrix(np.linalg.cholesky(D.numpy())); L
[1.0 0.0]
[1.0 1.0]
HTH,
Dmitrii
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.