Skip to content

Max

Running max.

Attributes

  • max (float)

    The current max.

Examples

from river import stats

X = [1, -4, 3, -2, 5, -6]
maximum = stats.Max()
for x in X:
    maximum.update(x)
    print(maximum.get())
1
1
3
3
5
5

Methods

get

Return the current value of the statistic.

update

Update and return the called instance.

Parameters

  • x'numbers.Number'