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

def __call__(self, t):

    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]
    if self.ascending:
        segments = np.searchsorted(self.ts_sorted, t_sorted, side='left')
    else:
        segments = np.searchsorted(self.ts_sorted, t_sorted, side='right')
    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
