From b83c24f584aedaff7b64a2bdacb35ebf43f64b56 Mon Sep 17 00:00:00 2001 From: Thomas Duvernay Date: Fri, 2 Jun 2023 21:17:31 +1000 Subject: [PATCH] ENH: Update segment comment Co-authored-by: Albert Steppi --- scipy/integrate/_ivp/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scipy/integrate/_ivp/common.py b/scipy/integrate/_ivp/common.py index 271e73ea9905..1721d1a41c73 100644 --- a/scipy/integrate/_ivp/common.py +++ b/scipy/integrate/_ivp/common.py @@ -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)