I have 2 numpy arrays:
A = np.array([6, 7 ,8 ,9, 0])
B = np.array([5, 3, 2, 4, 1])
And would like to reshuffle the first one using the second array. So the first element of A should go to place 5 in the output array. The second element should go to to the third etc. So the output array becomes:
C = np.array([0, 8, 7, 9, 6])
This is simple using a simply python loop, but I would like to use numpy only. Speed is very important.