numpy.maximum.accumulate works for me.
numpy.maximum.accumulate
>>> import numpy>>> numpy.maximum.accumulate(numpy.array([11,12,13,20,19,18,17,18,23,21]))array([11, 12, 13, 20, 20, 20, 20, 20, 23, 23])
As suggested, there is scipy.maximum.accumulate:
scipy.maximum.accumulate
In [9]: xOut[9]: [1, 3, 2, 5, 4]In [10]: scipy.maximum.accumulate(x)Out[10]: array([1, 3, 3, 5, 5])