staircase.StairsArray.limit#

StairsArray.limit(x, side='right')#

Takes a collection of Stairs instances and evaluates their limits across a set of points.

Technically 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.

Parameters
xscalar or vector data

The points at which to sample the Stairs instances. Must belong to the step function domain.

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 changes 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.

Returns
pandas.DataFrame

A dataframe, where rows correspond to the Stairs instances in the StairsArray. and columns correspond to the points in x.

Examples

../../_images/staircase-StairsArray-limit-1.png
>>> import staircase as sc
>>> stairs = sc.StairsArray([s2, s3])
>>> [s2.closed, s3.closed]
["left", "left]
>>> stairs.limit([2,3,4], side="left"))
     2    3    4
0  0.5  0.0 -1.0
1  1.0  NaN  1.0
>>> stairs.limit([2,3,4], side="right"))
     2    3    4
0  0.0 -1.0 -1.0
1  0.0  NaN -1.0