I have the following arrays:
a = np.arange(12).reshape((2, 2, 3))
and
b = np.zeros((2, 2))
Now I want to use b to access a, s.t. at each for index i,j we take the z-th element of a, if b[i, j] = z. Meaning for the above example the answer should be [[0, 3], [6, 9]]. I feel this is very related to np.choose, but yet somehow cannot quite manage it. Can you help me?