## How to rearrange array based upon index array

I’m looking for a one line solution that would help me do the following. Suppose I have array = np.array([10, 20, 30, 40, 50]) I’d like to rearrange it based upon an input ordering. If there were a numpy function called arrange, it would do the following: newarray = np.arrange(array, [1, 0, 3, 4, 2]) … Read more