Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes binary operation #201 #214

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions wfdb/io/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,9 +1339,9 @@ def field2bytes(field, value):
# Just need samp and sym
else:
# - First byte stores low 8 bits of samp
# - Second byte stores high 2 bits of samp
# and sym
data_bytes = [sd & 255, ((sd & 768) >> 8) + 4*typecode]
# - Second byte stores high 2 bits of samp and sym
second_arg = bin(int(((sd & 768) >> 8),2) + int(4*typecode,2))
data_bytes = [sd & 255, second_arg]

elif field == 'num':
# First byte stores num
Expand Down