[SciPy-dev] Sorted Eigenvalues/vectors

Bill Baxter wbaxter@gmail....
Mon Jul 9 14:12:53 CDT 2007

Sounds like you're looking for argsort.  Something like:

  ix = numpy.argsort(eigvals)
  sorted_eigvals = eigvals[ix]
  sorted_eigvecs = eigvecs[:,ix]


On 7/10/07, Jeremy Conlin <jeremit0@gmail.com> wrote:
> I have a need to have the eigenvalues/vectors calculated in my code
> returned sorted by eigenvalue.  Of course this necessitates sorting
> the eigenvectors accordingly.  If I understand correctly, a method for
> this doesn't exist in the current distribution so I wrote a simple one
> myself.  Is this something that the community is interested in?
> Should a method like this be included in the scipy distribution?  It
> is small, but I think very useful.
> Thanks,
> Jeremy Conlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20070710/4d86f756/attachment.html 

More information about the Scipy-dev mailing list