Return the running maximum of x — the highest value seen so far at each position

NumPy · from Running totals and differences

.cumsum.cumprodnp.diffnp.gradientnp.maximum.accumulateprepend=

Putting the kettle on…

Starting up…

Exercise 4

Return the running maximum of x — the highest value seen so far at each position.

your answer
stuck? the lesson behind it
Running totals and differences
The reductions that don’t reduce — cumsum, diff, and their friends.