[Numpy-discussion] sort bug

tan2 tan2tan2 at gmail.com
Thu Apr 26 15:16:14 EDT 2007


>
> On 4/26/07, Anton Sherwood <anton.sherwood at gmail.com> wrote:
> >
> >
> > All I really need is the four highest eigenvalues and their vectors.
> > I'll have a look in "Python Cookbook" to see if there's a more
> > efficient way to do that partial sort.
>
>
>

Maybe "heapq.nlargest()" is what you want?
http://www.python.org/doc/2.4/lib/module-heapq.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070426/8a06e1c9/attachment.html>


More information about the NumPy-Discussion mailing list