Skip to content

Commit

Permalink
ENH: Update segment comment
Browse files Browse the repository at this point in the history
Co-authored-by: Albert Steppi <albert.steppi@gmail.com>
  • Loading branch information
Patol75 and steppi committed Jun 2, 2023
1 parent 7040629 commit b83c24f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scipy/integrate/_ivp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def __init__(self, ts, interpolants, alt_segment=False):

def _call_single(self, t):
# Here we preserve a certain symmetry that when t is in self.ts,
# then we prioritize a segment with a lower index.
# if alt_segment=False, then we prioritize a segment with a lower
# index.
ind = np.searchsorted(self.ts_sorted, t, side=self.side)

segment = min(max(ind - 1, 0), self.n_segments - 1)
Expand Down

0 comments on commit b83c24f

Please sign in to comment.