ess.reduce.streaming.MaxAccumulator#

class ess.reduce.streaming.MaxAccumulator(**kwargs)[source]#

Keeps the maximum value seen so far.

Only supports scalar values.

__init__(**kwargs)[source]#
Parameters:

preprocess – Preprocessing function to be applied to pushed values prior to accumulation.

Methods

__init__(**kwargs)

clear()

Clear the accumulated maximum value.

push(value)

Push a value to the accumulator.

Attributes

is_empty

Check if the accumulator has collected a maximum value.

value

Get the accumulated value.

clear()[source]#

Clear the accumulated maximum value.

Return type:

None

property is_empty: bool#

Check if the accumulator has collected a maximum value.