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
rdann: compute timestamps as int, not a numpy integer.
When reading an annotation file in WFDB format, the timestamp (sample
number) must be computed by adding up the relative timestamp
difference for each annotation. For long records, sample numbers can
easily exceed 2**32.
The input to proc_core_fields is a numpy array, so if we operate on
the byte values with ordinary arithmetic operations, the result will
be a numpy integer object with numpy's default precision (i.e., int32
on 32-bit architectures, int64 on 64-bit architectures.)
Instead, calculate the result as a Python integer, to avoid
architecture-dependent behavior and (possible) silent wrapping.
(Furthermore, use left-shift operations instead of multiplying by
constants that are hard to remember.)
0 commit comments