I have a 2D array a
given by:
a = np.array([[2, 3, 1, 9], [0, 5, 4, 7], [2, 4, 6, 8]])
[[2 3 1 9]
[0 5 4 7]
[2 4 6 8]]
I would like to get row numbers of maximum elements column-wise, i.e. given by np.amax(a, axis=0)
, which in my example are [0, 1, 2, 0]
. What is the Numpy magic to accomplish it?