class_docstr: Callable step function.
  
  .. math::
  
      f(z) = a * y_i + b,
      x_i \leq z < x_{i + 1}
  
  Parameters
  ----------
  x : ndarray, shape = (n_points,)
      Values on the x axis in ascending order.
  
  y : ndarray, shape = (n_points,)
      Corresponding values on the y axis.
  
  a : float, optional, default: 1.0
      Constant to multiply by.
  
  b : float, optional, default: 0.0
      Constant offset term.
  
  domain : tuple, optional
      A tuple with two entries that sets the limits of the
      domain of the step function.
      If entry is `None`, use the first/last value of `x` as limit.
docstr: Evaluate step function.
  
  Values outside the interval specified by `self.domain`
  will raise an exception.
  Values in `x` that are in the interval `[self.domain[0]; self.x[0]]`
  get mapped to `self.y[0]`.
  
  Parameters
  ----------
  x : float|array-like, shape=(n_values,)
      Values to evaluate step function at.
  
  Returns
  -------
  y : float|array-like, shape=(n_values,)
      Values of step function at `x`.
docstr_tok: ["Evaluate","step","function",".","Values","outside","the","interval","specified","by","`","self.domain","`","will","raise","an","exception",".","Values","in","`","x","`","that","are","in","the","interval","`","[","self.domain","[","0","]",";","self.x","[","0","]","]","`","get","mapped","to","`","self.y","[","0","]","`",".","Parameters","--","--","--","--","--","x",":","float|array-like",",","shape=","(","n_values",",",")","Values","to","evaluate","step","function","at",".","Returns","--","--","--","-","y",":","float|array-like",",","shape=","(","n_values",",",")","Values","of","step","function","at","`","x","`","."]
code: def __call__(self, x):
      """Evaluate step function.
  
      Values outside the interval specified by `self.domain`
      will raise an exception.
      Values in `x` that are in the interval `[self.domain[0]; self.x[0]]`
      get mapped to `self.y[0]`.
  
      Parameters
      ----------
      x : float|array-like, shape=(n_values,)
          Values to evaluate step function at.
  
      Returns
      -------
      y : float|array-like, shape=(n_values,)
          Values of step function at `x`.
      """
      x = np.atleast_1d(x)
      if not np.isfinite(x).all():
          raise ValueError("x must be finite")
      if np.min(x) < self._domain[0] or np.max(x) > self.domain[1]:
          raise ValueError(
              f"x must be within [{self.domain[0]:f}; {self.domain[1]:f}]"
          )
  
      # x is within the domain, but we need to account for self.domain[0] <= x < self.x[0]
      x = np.clip(x, a_min=self.x[0], a_max=None)
  
      i = np.searchsorted(self.x, x, side="left")
      not_exact = self.x[i] != x
      i[not_exact] -= 1
      value = self.a * self.y[i] + self.b
      if value.shape[0] == 1:
          return value[0]
      return value
  
file_path: scikit-survival/sksurv/functions.py
imports: import numpy
  from sklearn.utils import check_consistent_length
label_desc: Use image node_id 3 for calling the StepFunction obj's underlying member method code with example usage: obj.__call__(x) and returns: value, value