# staircase.Stairs.max¶

Stairs.max(lower=-inf, upper=inf, lower_how='right', upper_how='left')

Calculates the maximum value of the step function

If an interval which to calculate over is specified it is interpreted as a closed interval, with lower_how and upper_how indicating how the step function should be evaluated at the at the endpoints of the interval.

Parameters: lower (int, float or pandas.Timestamp, optional) – lower bound of the interval on which to perform the calculation upper (int, float or pandas.Timestamp, optional) – upper bound of the interval on which to perform the calculation lower_how ({'left', 'right'}, default 'right') – Determines how the step function should be evaluated at lower. If ‘left’ then $$\lim_{x \to lower^{-}} f(x)$$ is included in the calculation. upper_how ({'left', 'right'}, default 'left') – Determines how the step function should be evaluated at upper. If ‘right’ then $$\lim_{x \to upper^{+}} f(x)$$ is included in the calculation. The maximum value of the step function float

Examples

>>> s1.plot()
>>> s1.max()
1.0
>>> s1.max(4, 5)
-1
>>> s1.max(4, 5, lower_how='left')
1
>>> s1.max(4, 5, upper_how='right')
0