[Numpy-discussion] argmax for top N elements

Benjamin Root ben.root@ou....
Wed Jun 22 14:11:31 CDT 2011


On Wed, Jun 22, 2011 at 2:08 PM, RadimRehurek <RadimRehurek@seznam.cz>wrote:

> > Date: Wed, 22 Jun 2011 11:30:47 -0400
> > From: Alex Flint <alex.flint@gmail.com>
> > Subject: [Numpy-discussion] argmax for top N elements
> >
> > Is it possible to use argmax or something similar to find the locations
> of
> > the largest N elements in a matrix?
>
> I would also be interested in an O(N) argmax/argmin for indices of top k
> values in an array. I'm currently using argsort[:k] in a performance
> sensitive part and it's not ideal.
>
> Best,
> Radim
>

I think there were some discussions recently for new features to add to the
next release of Numpy, and I think this was one of them.

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110622/46eb9164/attachment.html 


More information about the NumPy-Discussion mailing list