I have a 2 dimensional NumPy array. I know how to get the maximum values over 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? I would like as output array([1,1,0])
instead.
>>> a.argmax(axis=0)
array([1, 1, 0])