Skip to content
Snippets Groups Projects
Commit 0f9739c0 authored by François  LAURENT's avatar François LAURENT
Browse files

bug fix for time intervals with infinite number of decimals

parent f9e9aff9
No related branches found
No related tags found
No related merge requests found
Pipeline #89663 passed
......@@ -48,10 +48,10 @@ def interpolate(times, spines, anchor, window_length,
grid = range(istart, istop+1)
series = []
for i in grid:
t = round((anchor + i * frame_interval) * 1e4) * 1e-4
t = np.trunc((anchor + i * frame_interval) * 1e4) * 1e-4
inext = np.flatnonzero(t <= times)[0]
tnext, xnext = times[inext], spines[inext]
if tnext == t:
if tnext - t < 1e-4:
x = xnext
else:
assert 0 < inext
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment