Skip to content

Commit

Permalink
Cast filebytes to int64
Browse files Browse the repository at this point in the history
Adding just  causes the multiplication to precede the bitwise & operator, so I added an extra set of parentheses to maintain the order.
  • Loading branch information
tompollard committed Oct 11, 2024
1 parent e729062 commit a5e1bd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wfdb/io/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2237,8 +2237,8 @@ def proc_core_fields(filebytes, bpi):

# Not a skip - it is the actual sample number + annotation type store value
label_store = int(filebytes[bpi, 1]) >> 2
sample_diff += np.int64(filebytes[bpi, 0]) + 256 * np.int64(
filebytes[bpi, 1] & 3
sample_diff += np.int64(filebytes[bpi, 0]) + 256 * (
np.int64(filebytes[bpi, 1]) & 3
)
bpi = bpi + 1

Expand Down

0 comments on commit a5e1bd3

Please sign in to comment.