Let's say I have an array which it's dimensions are 10 X 20 X 12 X 12 X 2 X 2
. What should I do if I want to get the maximum values indices of the last two axes? meaning I want a function which will output (if the described array is the input) an array of shape: 10 X 20 X 12 X 12
. So (array is the described array):
array[indices] == np.amax(array, (-2,-1))