Skip to content

Commit 8857b7e

Browse files
committed
Use np.frombuffer instead of np.fromstring
1 parent 3d51cec commit 8857b7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _stream_dat(file_name, pn_dir, byte_count, start_byte, dtype):
143143
content = f.read(byte_count)
144144

145145
# Convert to numpy array
146-
sig_data = np.fromstring(content, dtype=dtype)
146+
sig_data = np.frombuffer(content, dtype=dtype)
147147

148148
return sig_data
149149

@@ -173,7 +173,7 @@ def _stream_annotation(file_name, pn_dir):
173173
content = f.read()
174174

175175
# Convert to numpy array
176-
ann_data = np.fromstring(content, dtype=np.dtype("<u1"))
176+
ann_data = np.frombuffer(content, dtype=np.dtype("<u1"))
177177

178178
return ann_data
179179

0 commit comments

Comments
 (0)