I have a np.array
stored in a variable, x
, which looks like below:
array([[ 956],
[ 929],
[1083],
[1074],
[ 922]]
I want to subtract every number from the previous number, and I want a new variable, y
, to look like below:
array([[ -27],
[ 154],
[ -9],
[-152]]