class_docstr: Continuous ODE solution.
  
  It is organized as a collection of `DenseOutput` objects which represent
  local interpolants. It provides an algorithm to select a right interpolant
  for each given point.
  
  The interpolants cover the range between `t_min` and `t_max` (see
  Attributes below). Evaluation outside this interval is not forbidden, but
  the accuracy is not guaranteed.
  
  When evaluating at a breakpoint (one of the values in `ts`) a segment with
  the lower index is selected.
  
  Parameters
  ----------
  ts : array_like, shape (n_segments + 1,)
      Time instants between which local interpolants are defined. Must
      be strictly increasing or decreasing (zero segment with two points is
      also allowed).
  interpolants : list of DenseOutput with n_segments elements
      Local interpolants. An i-th interpolant is assumed to be defined
      between ``ts[i]`` and ``ts[i + 1]``.
  alt_segment : boolean
      Requests the alternative interpolant segment selection scheme. At each
      solver integration point, two interpolant segments are available. The
      default (False) and alternative (True) behaviours select the segment
      for which the requested time corresponded to ``t`` and ``t_old``,
      respectively. This functionality is only relevant for testing the
      interpolants' accuracy: different integrators use different
      construction strategies.
  
  Attributes
  ----------
  t_min, t_max : float
      Time range of the interpolation.
class_docstr_tok: ["Continuous","ODE","solution",".","It","is","organized","as","a","collection","of","`","DenseOutput","`","objects","which","represent","local","interpolants",".","It","provides","an","algorithm","to","select","a","right","interpolant","for","each","given","point",".","The","interpolants","cover","the","range","between","`","t_min","`","and","`","t_max","`","(","see","Attributes","below",")",".","Evaluation","outside","this","interval","is","not","forbidden",",","but","the","accuracy","is","not","guaranteed",".","When","evaluating","at","a","breakpoint","(","one","of","the","values","in","`","ts","`",")","a","segment","with","the","lower","index","is","selected",".","Parameters","--","--","--","--","--","ts",":","array_like",",","shape","(","n_segments","+","1",",",")","Time","instants","between","which","local","interpolants","are","defined",".","Must","be","strictly","increasing","or","decreasing","(","zero","segment","with","two","points","is","also","allowed",")",".","interpolants",":","list","of","DenseOutput","with","n_segments","elements","Local","interpolants",".","An","i-th","interpolant","is","assumed","to","be","defined","between","``","ts","[","i","]","``","and","``","ts","[","i","+","1","]","``",".","alt_segment",":","boolean","Requests","the","alternative","interpolant","segment","selection","scheme",".","At","each","solver","integration","point",",","two","interpolant","segments","are","available",".","The","default","(","False",")","and","alternative","(","True",")","behaviours","select","the","segment","for","which","the","requested","time","corresponded","to","``","t","``","and","``","t_old","``",",","respectively",".","This","functionality","is","only","relevant","for","testing","the","interpolants","'","accuracy",":","different","integrators","use","different","construction","strategies",".","Attributes","--","--","--","--","--","t_min",",","t_max",":","float","Time","range","of","the","interpolation","."]
docstr: Evaluate the solution.
  
  Parameters
  ----------
  t : float or array_like with shape (n_points,)
      Points to evaluate at.
  
  Returns
  -------
  y : ndarray, shape (n_states,) or (n_states, n_points)
      Computed values. Shape depends on whether `t` is a scalar or a
      1-D array.
docstr_tok: ["Evaluate","the","solution",".","Parameters","--","--","--","--","--","t",":","float","or","array_like","with","shape","(","n_points",",",")","Points","to","evaluate","at",".","Returns","--","--","--","-","y",":","ndarray",",","shape","(","n_states",",",")","or","(","n_states",",","n_points",")","Computed","values",".","Shape","depends","on","whether","`","t","`","is","a","scalar","or","a","1-D","array","."]
code: def __call__(self, t):
      """Evaluate the solution.
  
      Parameters
      ----------
      t : float or array_like with shape (n_points,)
          Points to evaluate at.
  
      Returns
      -------
      y : ndarray, shape (n_states,) or (n_states, n_points)
          Computed values. Shape depends on whether `t` is a scalar or a
          1-D array.
      """
      t = np.asarray(t)
  
      if t.ndim == 0:
          return self._call_single(t)
  
      order = np.argsort(t)
      reverse = np.empty_like(order)
      reverse[order] = np.arange(order.shape[0])
      t_sorted = t[order]
  
      # See comment in self._call_single.
      segments = np.searchsorted(
          self.ts_sorted, t_sorted, side=self.side
      )
      segments -= 1
      segments[segments < 0] = 0
      segments[segments > self.n_segments - 1] = self.n_segments - 1
      if not self.ascending:
          segments = self.n_segments - 1 - segments
  
      ys = []
      group_start = 0
      for segment, group in groupby(segments):
          group_end = group_start + len(list(group))
          y = self.interpolants[segment](
              t_sorted[group_start:group_end]
          )
          ys.append(y)
          group_start = group_end
  
      ys = np.hstack(ys)
      ys = ys[:, reverse]
  
      return ys
  
file_path: scipy/scipy/integrate/_ivp/common.py
imports: from itertools import groupby
  from warnings import warn
  import numpy
  from scipy.sparse import find, coo_matrix
label_desc: Use image node_id 3 for calling the OdeSolution obj's underlying member method code with example usage: obj.__call__(t) and returns: ys, self