[SciPy-user] How to use argmax ?

Daniel Lenski dlenski@gmail....
Mon Oct 22 14:04:54 CDT 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