matrix.
cumsum
Return the cumulative sum of the elements along the given axis.
Refer tonumpy.cumsum for full documentation.
numpy.cumsum
See also
numpy.matrix.cumprod
numpy.matrix.diagonal