What I want to do is take my current array and subtract the previous rows column value from the current rows column value. I also want to take the result and add it to the array as a new dimension.
Example Array:
[[1,2,4,7,9,15], [3, 4,3,5,10,2], [5,6,56,7,20,1]]
Lets say I want to do this with the 4th column so I want the output to be an array that looks like this:
[[1,2,4,7,9,15,0], [3, 4,3,5,10,2,-2], [5,6,56,7,20,1,2]]
Thanks
You can do this using a combination of
np.diff, andconcatenateoptions, like so: