LinearAlgebraError: SVD did not converge

Pearu Peterson pearu at cens.ioc.ee
Tue Aug 27 13:08:29 CEST 2002


On 27 Aug 2002, Damian Menscher wrote:

> I'm trying to get the SVD inverse of a matrix, so I'm calling
> LinearAlgebra.generalized_inverse(M, rcond).  But sometimes it
> bombs out with the error "LinearAlgebraError: SVD did not
> converge".  Seems odd that it would die, considering Numerical
> Recipes states "SVD... (theoretically) cannot fail...." (section
>  15.4).  I'm guessing this is because lapack_lite uses an
> iterative method rather than a deterministic one?  (I'm using
> version 2.1, in case it's relevant.)
> 
> Does anyone know of a package that has a *working* SVD inverse?
> I'd try to debug the lapack_lite one, but all I've got is a .so
> file....

Have you tried SciPy (www.scipy.org)? There are two functions in linalg
module for computing pseudo-inverses of matrices. One is based on least
squares and the other one on SVD.

HTH,
Pearu






More information about the Python-list mailing list