Skip to content

Commit

Permalink
Remove the .astype call in rdann, as a numpy upper bound is sufficien…
Browse files Browse the repository at this point in the history
…t for now (see #493).
  • Loading branch information
Ivorforce committed Jul 4, 2024
1 parent 0378030 commit 39cd94b
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 @@ -1949,9 +1949,9 @@ def rdann(

# Read the file in byte pairs
if ann_stream is not None:
filebytes = np.frombuffer(ann_stream.read(), "<u1").reshape([-1, 2]).astype(np.int32)
filebytes = np.frombuffer(ann_stream.read(), "<u1").reshape([-1, 2])
else:
filebytes = load_byte_pairs(record_name, extension, pn_dir).astype(np.int32)
filebytes = load_byte_pairs(record_name, extension, pn_dir)

# Get WFDB annotation fields from the file bytes
(sample, label_store, subtype, chan, num, aux_note) = proc_ann_bytes(
Expand Down

0 comments on commit 39cd94b

Please sign in to comment.