The cumulative sum function returns a data set that has the same length as the original set of points. Element I of the set returned by cum_sum is the sum of elements 1 through I of the original data set.

Try to play a bit with this function and see what it outputs depending on your data.