Skip to content

Commit

Permalink
Merge pull request #239 from Alek050/238-bug-fill_missing_samples
Browse files Browse the repository at this point in the history
Fixed bug on first index of fill_missing_samples
  • Loading branch information
felixchenier committed May 14, 2024
2 parents 1a881ce + 153952f commit bcaf1c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kineticstoolkit/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -3646,7 +3646,8 @@ def fill_missing_samples(
elif (
current_index - hole_start_index > max_missing_samples
):
to_keep[hole_start_index + 1 : current_index + 1] = 0
hole_start_index += 1 if hole_start_index > 0 else 0
to_keep[hole_start_index : current_index + 1] = 0

ts.data[data][to_keep == 0] = np.nan

Expand Down

0 comments on commit bcaf1c4

Please sign in to comment.