From ec42f4d1f795da6e5617b969bcb3906e9b7edef7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net>
Date: Tue, 17 Jan 2023 17:15:01 +0100
Subject: [PATCH] fixes #20

---
 src/taggingbackends/features/skeleton.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/taggingbackends/features/skeleton.py b/src/taggingbackends/features/skeleton.py
index e21df0f..f98d370 100644
--- a/src/taggingbackends/features/skeleton.py
+++ b/src/taggingbackends/features/skeleton.py
@@ -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
-- 
GitLab