[Numpy-discussion] linear algebra help

Stéfan van der Walt stefan at sun.ac.za
Mon May 18 04:21:44 EDT 2009


2009/5/18 Sebastian Walter <sebastian.walter at 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.

Regards
Stéfan



More information about the NumPy-Discussion mailing list