Skip to content

Commit

Permalink
Use uint16_codec argument (#12971)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr authored Nov 18, 2024
1 parent a267b86 commit aa9dcb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changes/devel/12971.newfeature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for ``uint16_codec`` argument in :func:`mne.io.read_raw_eeglab` when ``pymatreader`` (which already supported this argument previously) is not installed, by `Clemens Brunner`_.
4 changes: 3 additions & 1 deletion mne/io/eeglab/_eeglab.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def _readmat(fname, uint16_codec=None):
try:
read_mat = _import_pymatreader_funcs("EEGLAB I/O")
except RuntimeError: # pymatreader not installed
eeg = loadmat(fname, squeeze_me=True, mat_dtype=False)
eeg = loadmat(
fname, squeeze_me=True, mat_dtype=False, uint16_codec=uint16_codec
)
return _check_for_scipy_mat_struct(eeg)
else:
return read_mat(fname, uint16_codec=uint16_codec)

0 comments on commit aa9dcb6

Please sign in to comment.