staircase.Stairs.agg¶
- Stairs.agg(name, where=(<staircase.constants.NegInf object>, <staircase.constants.Inf object>), closed=None)¶
Returns the aggregation of the step function defined over a domain.
- Parameters
- name{‘max’, ‘min’, ‘mode’, ‘median’, ‘mean’, ‘integral’, ‘var’, ‘std’}
The name of the function which which to perform the aggregation.
- wheretuple or list of length two, optional
Indicates the domain interval over which to evaluate the step function. Default is (-sc.inf, sc.inf) or equivalently (None, None).
- closed{‘both’, ‘left’, ‘right’, ‘neither’}, optional
Note that this parameter will only change the result for ‘min’ or ‘max’ aggregations. Indicates whether the interval defined by where is closed on both sides, left-closed, right-closed, or neither. Default value is taken from the closed attribute of the step function. The default values will be used if closed=None is used.
- Returns
- float
See also
Examples
>>> s1.plot(arrows=True)
>>> s1.agg(where=(1,4), name="min") 0
>>> s1.agg(where=(1,4), name="min", closed="both") -1
>>> s1.agg(where=(1,4), name="integral") 2.0