[Numpy-discussion] sort bug

Anne Archibald peridot.faceted@gmail....
Thu Apr 26 14:05:47 CDT 2007

On 26/04/07, Anton Sherwood <anton.sherwood@gmail.com> wrote:

> All I really need is the four highest eigenvalues and their vectors.

It's not really very efficient, but sorting time is going to be tiny
compared to however you get your eigenvalues, so you could argsort the
eigenvalue array and use the result to sort the eigenvector array.

You can also accelerate the process by quickly checking whether the
eigenvalue array is already sorted - usually it is.


More information about the Numpy-discussion mailing list