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
On Mon, 1 Jan 2007, Niklas Saers apparently wrote:
> If it makes any sense I'd love to send you this variable
> that had len(2048) but was very much longer if stomped
> flat. :-)
It looks like you may already understand this,
but just in case...
import numpy
r = numpy.random.random((100,5))
m
Hi,
while answering your email (making a smaller version with data via
pickle) I noticed that the variable "set" contained a very large
matrix (I'm not quite sure but I believe I may have thrown 2048
dimensions at it with a multiplication that went wrong, giving a
"set" object that pickled
On Mon, 1 Jan 2007, Niklas Saers apparently wrote:
> The problem is that set is an array of 2048 numbers. However, when I
> run this function I get:
> "maxPos = 7925760, while len(set) is 2048"
> I do not understand why I get such a high index. Do you have any
> suggestions?
Can you post cod
Hi,
I'm quite new to numpy. My understanding of argmax() is that it gives
the index of the highest number in the array, just like:
from numpy import *
a=array(range(4096))
a=a*15
argmax(a)
gives 4095.
But, when I use this within my program I have a little function:
def localMaxima(set):
10 matches
Mail list logo