From 3a6614495149eb0a733ed538f7fb60913f4e9835 Mon Sep 17 00:00:00 2001 From: jonasvdd Date: Fri, 14 Apr 2023 14:50:57 +0200 Subject: [PATCH 1/2] :sparkles: fix everyNth out of bound --- tsdownsample/downsamplers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdownsample/downsamplers.py b/tsdownsample/downsamplers.py index 2a79c83..b5a5c5c 100644 --- a/tsdownsample/downsamplers.py +++ b/tsdownsample/downsamplers.py @@ -63,4 +63,4 @@ def _downsample( "into account by the current implementation of the EveryNth algorithm." ) step = max(1, len(y) / n_out) - return np.arange(start=0, stop=len(y), step=step).astype(np.uint) + return np.arange(start=0, stop=len(y) - .1, step=step).astype(np.uint) From c6bbe193dbfed9dc2b0a13b03604115090c40491 Mon Sep 17 00:00:00 2001 From: jonasvdd Date: Fri, 14 Apr 2023 14:54:28 +0200 Subject: [PATCH 2/2] :see_no_evil: formatting --- tsdownsample/downsamplers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdownsample/downsamplers.py b/tsdownsample/downsamplers.py index b5a5c5c..57671af 100644 --- a/tsdownsample/downsamplers.py +++ b/tsdownsample/downsamplers.py @@ -63,4 +63,4 @@ def _downsample( "into account by the current implementation of the EveryNth algorithm." ) step = max(1, len(y) / n_out) - return np.arange(start=0, stop=len(y) - .1, step=step).astype(np.uint) + return np.arange(start=0, stop=len(y) - 0.1, step=step).astype(np.uint)