Skip to content

Commit 39cd94b

Browse files
committed
Remove the .astype call in rdann, as a numpy upper bound is sufficient for now (see #493).
1 parent 0378030 commit 39cd94b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/annotation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1949,9 +1949,9 @@ def rdann(
19491949

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

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

0 commit comments

Comments
 (0)