You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the signal with rdsamp and the corresponding annotations with rdann using the same sampto value results in an IndexError when accessing the signal array it includes an annotation outside the array.
In the example below, to read the first 100 entries, sampto must be 100. If using the same value for the annotations up to and including 100 are read, rather than stopping at 99 (i.e., the 100th entry in a 0-indexed array).
I agree, I think rdann should be consistent with rdsamp and I think sampfrom/sampto should define a half-open interval.
This would be an API-breaking change, though. I've kind of wanted to change that API in any case, perhaps renaming the args to from/to or start/end or something, so maybe we should do that at the same time.
When reading the signal with
rdsamp
and the corresponding annotations withrdann
using the samesampto
value results in an IndexError when accessing the signal array it includes an annotation outside the array.In the example below, to read the first 100 entries,
sampto
must be 100. If using the same value for the annotations up to and including 100 are read, rather than stopping at 99 (i.e., the 100th entry in a 0-indexed array).Is this the expected behaviour?
Using: python 3.9.18 with wfdb 4.1.2
The text was updated successfully, but these errors were encountered: