[SciPy-dev] Sorted Eigenvalues/vectors
Jeremy Conlin
jeremit0@gmail....
Tue Jul 10 11:00:13 CDT 2007
I have used argsort in my code, but certainly not as efficiently as
you have. That's nice, thanks. I guess my question is: should this
be more obvious in scipy/numpy by creating a method specifically for
sorting eigenpairs?
Thanks,
Jeremy
On 7/9/07, Bill Baxter <wbaxter@gmail.com> wrote:
> Sounds like you're looking for argsort. Something like:
>
> ix = numpy.argsort(eigvals)
> sorted_eigvals = eigvals[ix]
> sorted_eigvecs = eigvecs[:,ix]
>
> --bb
>
>
> 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
> >
> >
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
More information about the Scipy-dev
mailing list