code :

```
m = np.argmax(a, axis=1)
a[np.arange(a.shape[0])[:,None], m, np.arange(a.shape[2])]
#array([[7, 6],
# [5, 4]])
```

```
m = np.argmax(a, axis=1)
```

```
ind1, ind2, ind3 = np.arange(a.shape[0])[:,None], m, np.arange(a.shape[2])
```

```
for x in np.broadcast_arrays(ind1, ind2, ind3):
print(x, '\n')
#[[0 0]
# [1 1]]
#[[0 1]
# [1 0]]
#[[0 1]
# [0 1]]
```