Putting a very simple example of what I need to do, I have a 2-D array:
array([[0, 4],[2, 3],[4, 1],[0, 8],[3, 2],[4, 5],[6, 1],[0, 3],[1, 7],[2, 9]])
The first column is time and the other is distance. Being specifically what I have is [time, distance].
For my final array, I need to delete each time=0 and to make continuation of the time. Here is what my final array should be:
array([[0, 4],[2, 3],[4, 1],[7, 2],[8, 5],[10, 1],[11, 7],[12, 9]])
In this particular case, only [0, 8] and [0, 3] are deleted because they have time=0.
Also, the previous [3, 2] becomes [7, 2] given that 4+3=7 (because previous time was 4). Same goes for previous [4, 5] becomes [8, 5] given that 4+4=8.Same goes for previous [6, 1] becomes [10, 1] given that 4+6=10.
Same goes for previous [1, 7] becomes [11, 7] given that 10+1=11 (because previous time was 10).
Same goes for previous [2, 9] becomes [12, 9] given that 10+2=12.
I am just putting a very small piece of array, thus I need a Python code to do what I just explained.