Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions doc/changes/dev/13415.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug where ``mne.io.read_raw_gdf`` failed with NumPy ≥1.24 due to the removal of ``np.fromstring`` binary mode. Replaced with ``np.frombuffer`` for compatibility. (:newcontrib:`devparikh0506`)
1 change: 1 addition & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
.. _David Sabbagh: https://github.com/DavidSabbagh
.. _Demetres Kostas: https://github.com/kostasde
.. _Denis Engemann: https://denis-engemann.de
.. _Dev Parikh: https://github.com/devparikh0506
.. _Dinara Issagaliyeva: https://github.com/dissagaliyeva
.. _Diptyajit Das: https://github.com/dasdiptyajit
.. _Dirk Gütlin: https://github.com/DiGyt
Expand Down
4 changes: 2 additions & 2 deletions mne/io/edf/edf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1441,9 +1441,9 @@ def _read_gdf_header(fname, exclude, include=None):
edf_info["data_offset"] + edf_info["n_records"] * edf_info["bytes_tot"]
)
fid.seek(etp) # skip data to go to event table
etmode = fid.read(1).decode()
etmode = fid.read(1)
if etmode != "":
etmode = np.fromstring(etmode, UINT8).tolist()[0]
etmode = np.frombuffer(etmode, dtype=UINT8).tolist()[0]

if edf_info["number"] < 1.94:
sr = np.fromfile(fid, UINT8, 3)
Expand Down
Loading