Return the running total of cups down the days — so each column accumulates ind…
NumPy · from Running totals and differences
.cumsum.cumprodnp.diffnp.gradientnp.maximum.accumulateprepend=Putting the kettle on…
Starting up…
Exercise 3
Return the running total of cups down the days — so each column accumulates independently, and the shape stays (4, 3).
your answer
stuck? the lesson behind it
Running totals and differences
The reductions that don’t reduce — cumsum, diff, and their friends.