Skip to content

Commit dc61e8e

Browse files
authored
Merge pull request MIT-LCP#285 from MIT-LCP/neg_subtype_248
Allow annotation negative subtypes MIT-LCP#248
2 parents a3fc4a0 + bb6f893 commit dc61e8e

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
@@ -475,8 +475,8 @@ def check_field(self, field):
475475
# The C WFDB library stores num/sub/chan as chars.
476476
elif field == 'subtype':
477477
# signed character
478-
if min(self.subtype) < 0 or max(self.subtype) >127:
479-
raise ValueError("The 'subtype' field must only contain non-negative integers up to 127")
478+
if min(self.subtype) < -128 or max(self.subtype) > 127:
479+
raise ValueError("The 'subtype' field must only contain integers from -128 to 127")
480480
elif field == 'chan':
481481
# un_signed character
482482
if min(self.chan) < 0 or max(self.chan) >255:

0 commit comments

Comments
 (0)