Stairs.limit(x, side, include_index=False)

Evaluates the limit of the step function as it approaches one, or more, points.

The results of this function should be considered as \(\lim_{x \to z^{-}} f(x)\) or \(\lim_{x \to z^{+}} f(x)\), when side = ‘left’ or side = ‘right’ respectively. See A note on interval endpoints for an explanation.

xint, float or vector data

Values at which to evaluate the function

side{‘left’, ‘right’}, default ‘right’

If points where step changes occur do not coincide with x then this parameter has no effect. Where a step change occurs at a point given by x, this parameter determines if the step function is evaluated at the interval to the left, or the right.

include_indexbool, default False

Indicates if the values returned should be a numpy.ndarray, or in a pandas.Series indexed by the values in x

float, numpy.ndarray, pandas.Series


>>> s3.plot(arrows=True)
>>> s3.limit(2, side="left")
>>> s3.limit(2, side="right")
>>> s3.limit([2, 2.5, 3.5], side="right")
array([ 0., nan,  1.])