Skip to content

Commit bb6f893

Browse files
committed
Allow annotation negative subtypes #248
1 parent 7889664 commit bb6f893

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/annotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ def check_field(self, field):
474474
# The C WFDB library stores num/sub/chan as chars.
475475
elif field == 'subtype':
476476
# signed character
477-
if min(self.subtype) < 0 or max(self.subtype) >127:
478-
raise ValueError("The 'subtype' field must only contain non-negative integers up to 127")
477+
if min(self.subtype) < -128 or max(self.subtype) > 127:
478+
raise ValueError("The 'subtype' field must only contain integers from -128 to 127")
479479
elif field == 'chan':
480480
# un_signed character
481481
if min(self.chan) < 0 or max(self.chan) >255:

0 commit comments

Comments
 (0)