I have the following numpy array:
x=np.array([0,1,2,3,4])
and want to create an array where the value in index 0 is in index 1, index 1 is in index 2, etc.
The output I want is:
y=np.array([0,0,1,2,3]).
How can I do this in a numPythonic way? Can anyone help?