[Numpy-discussion] A question about argmax and argsort
asafdav2 at gmail.com
Tue Dec 12 08:06:53 CST 2006
Let's say i have an N sized array, and i want to get the positions of the K
largest items. for K = 1 this is simply argmax. is there any way to
generalize it for k !=1? currently I use argsort and take only K items from
it, but I'm paying an additional ~lg(N)...
Thanks in advance, asaf
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion