[Numpy-discussion] linear algebra help

Stéfan van der Walt stefan@sun.ac...
Mon May 18 03:21:44 CDT 2009

2009/5/18 Sebastian Walter <sebastian.walter@gmail.com>:
> B = numpy.dot(A.T, A)

This multiplication should be avoided whenever possible -- you are
effectively squaring your condition number.

In the case where you have more rows than columns, use least squares.
For square matrices use solve.  For large sparse matrices, use GMRES
or any of the others available in scipy.sparse.linalg.


More information about the Numpy-discussion mailing list