Skip to content
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion mne/io/edf/edf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ def _read_gdf_header(fname, exclude, include=None):
fid.seek(etp) # skip data to go to event table
etmode = fid.read(1).decode()
if etmode != "":
etmode = np.fromstring(etmode, UINT8).tolist()[0]
etmode = np.frombuffer(etmode.encode(), dtype=UINT8).tolist()[0]
Copy link
Member

@larsoner larsoner Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decode it just to encode it? Maybe we could do instead

etmode = fid.read(1)
if len(etmode):
    etmode = np.frombuffer(etmode, dtype=UINT8)[0]


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