Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'scikit-digital-health',
'c',
version: '0.17.2',
version: '0.17.3',
license: 'MIT',
meson_version: '>=1.1',
)
Expand Down
4 changes: 2 additions & 2 deletions src/skdh/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def trim_data(self, start_key, end_key, tz_name, predict_kw, *, time, **data):

# write it so that if there is any time weirdness, get the data from the "middle",
# ie the last index before the start time, and the first index after the end time.
i1 = nonzero(time <= ts_trim_start)[0][-1]
i2 = nonzero(time >= ts_trim_end)[0][0]
i1 = nonzero(time <= max(time[0], ts_trim_start))[0][-1]
i2 = nonzero(time >= min(time[-1], ts_trim_end))[0][0]

res = {self._time: time[i1:i2]}
res.update({k: v[i1:i2] for k, v in data.items()})
Expand Down
Loading