I'm sure this question has been answered somewhere, but I just can't find the words to look for it.
I have these two arrays:
import numpy as np
src = np.array([[8, 1],
[2, 4]])
dst = np.array([[1, 4],
[8, 2]])
I would like to get this array:
indices = (np.array([[1, 0],
[1, 0]]),
np.array([[0, 0],
[1, 1]]))
Such that dst[indices]
gets me src
.
Any ideas? Moreover, what is the kind of operation that I'm looking for called? So that I can search more about it by myself in the future.