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

fixes #20

parent 58b4d557
No related branches found
No related tags found
No related merge requests found
Pipeline #95926 passed
......@@ -46,11 +46,12 @@ def interpolate(times, spines, anchor, window_length,
if istop - istart + 1 < window_length:
return
grid = range(istart, istop+1)
times = np.around(times, 4)
series = []
for i in grid:
t = np.around(anchor + i * frame_interval, 4)
# nextafter may be useless now that we use around instead of trunc
inext = np.flatnonzero(np.nextafter(t, 0) <= times)[0]
inext = np.flatnonzero(t <= times)[0]
tnext, xnext = times[inext], spines[inext]
if tnext - t < 1e-4:
x = xnext
......
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