Is there quick way to calculate the difference between two elements in subsequent pairs in python arrays? For example, consider x:
x = np.array([1,5,3,8])
How can I calculate from x the differences between subsequent pairs? My desired output is:
np.array([4,5])
