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
>>
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
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
> 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/
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
>
___
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