staircase.Stairs.values_in_range#
- Stairs.values_in_range(where=(<staircase.constants.NegInf object>, <staircase.constants.Inf object>), closed=None)#
Returns the range (i.e. values) of the step function defined over a domain.
- Parameters
- 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
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
numpy.ndarray
n A numpy array of unique values
See also
Examples
>>> s1.plot(arrows=True)
>>> s1.values_in_range() array([-1, 0, 1], dtype=int64)
>>> s1.values_in_range((1,4)) array([0, 1], dtype=int64)
>>> s1.values_in_range((1,4), closed='both') array([-1, 0, 1], dtype=int64)