NumPy > Array cumulative sum of elements

Name
Code
Output
array = numpy.random.randint(5, size=(2, 3))
print ("array \n",array)
result = array.cumsum()
print ("cumsum result \n",result)
array 
 [[4 2 0]
 [1 2 2]]
cumsum result 
[ 4  6  6  7  9 11]