[SciPy-user] How to use argmax ?

Daniel Lenski dlenski at gmail.com
Mon Oct 22 15:04:54 EDT 2007


Or maybe this is what you're looking for:

>>>> ind = a.argmax(axis=0)
>>>> a[ ind, [0,1,2] ]
array([60, 20, 14])

... which basically returns a[ind[0],0], a[ind[1],1], and a[ind[2],2].

Dan




More information about the SciPy-User mailing list