Re: [Numpy-discussion] argmax for top N elements

2011-06-22 Thread Keith Goodman
On Wed, Jun 22, 2011 at 12:08 PM, RadimRehurek wrote: >> Date: Wed, 22 Jun 2011 11:30:47 -0400 >> From: Alex Flint >> Subject: [Numpy-discussion] argmax for top N elements >> >> Is it possible to use argmax or something similar to find the locations of >>

Re: [Numpy-discussion] argmax for top N elements

2011-06-22 Thread Olivier Grisel
2011/6/22 RadimRehurek : >> Date: Wed, 22 Jun 2011 11:30:47 -0400 >> From: Alex Flint >> 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 matri

Re: [Numpy-discussion] argmax for top N elements

2011-06-22 Thread Benjamin Root
On Wed, Jun 22, 2011 at 2:08 PM, RadimRehurek wrote: > > Date: Wed, 22 Jun 2011 11:30:47 -0400 > > From: Alex Flint > > Subject: [Numpy-discussion] argmax for top N elements > > > > Is it possible to use argmax or something similar to find the locations > o

Re: [Numpy-discussion] argmax for top N elements

2011-06-22 Thread RadimRehurek
> Date: Wed, 22 Jun 2011 11:30:47 -0400 > From: Alex Flint > 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/

Re: [Numpy-discussion] argmax for top N elements

2011-06-22 Thread eat
Hi, On Wed, Jun 22, 2011 at 6:30 PM, Alex Flint wrote: > Is it possible to use argmax or something similar to find the locations of > the largest N elements in a matrix? How bout argsort(.)?, Like: In []: a= arange(9) In []: a.argsort()[::-1][:3] Out[]: array([8, 7, 6]) My 2 cents, eat > ___

[Numpy-discussion] argmax for top N elements

2011-06-22 Thread Alex Flint
Is it possible to use argmax or something similar to find the locations of the largest N elements in a matrix? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion