[Numpy-discussion] Solving Ax = b: inverse vs cholesky factorization

Pauli Virtanen pav@iki...
Mon Nov 8 14:17:46 CST 2010


On Mon, 08 Nov 2010 14:06:03 -0600, Bruce Southey wrote:
[clip]
> Numpy uses SVD to get the (pseudo) inverse, which is usually very
> accurate at getting (pseudo) inverse.

numpy.linalg.inv does

	solve(a, identity(a.shape[0], dtype=a.dtype))

It doesn't use xGETRI since that's not included in lapack_lite.

numpy.linalg.pinv OTOH does use SVD, but that's probably more costly.

-- 
Pauli Virtanen



More information about the NumPy-Discussion mailing list