I have a two-dimensional NumPy array. I know how to get the maximum values ββalong the axes:
>>> a = array([[1,2,3],[4,3,1]]) >>> amax(a,axis=0) array([4, 3, 3])
How can I get the indices of the maximum elements? So I would like to get the output of array([1,1,0])
python max numpy
Peter Smit Mar 29 '11 at 7:35 2011-03-29 07:35
source share