Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GDF NumPy >= 2 #12909

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Fix GDF NumPy >= 2 #12909

merged 2 commits into from
Oct 22, 2024

Conversation

cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Oct 22, 2024

Fixes #12907.

Copy link
Contributor Author

@cbrnr cbrnr left a comment

Choose a reason for hiding this comment

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

This fixes the issue encountered e.g. with this dataset.

However, and this is likely unrelated, I was wondering why the log contains next(self.gen):

>>> raw = mne.io.read_raw("/Users/clemens/Downloads/S01_MI/motorimagination_subject1_run1.gdf")
Extracting EDF parameters from /Users/clemens/Downloads/S01_MI/motorimagination_subject1_run1.gdf...
GDF file detected
Setting channel info structure...
Could not determine channel type of the following channels, they will be set as EEG:
F3, F1, Fz, F2, F4, FFC5h, FFC3h, FFC1h, FFC2h, FFC4h, FFC6h, FC5, FC3, FC1, FCz, FC2, FC4, FC6, FTT7h, FCC5h, FCC3h, FCC1h, FCC2h, FCC4h, FCC6h, FTT8h, C5, C3, C1, Cz, C2, C4, C6, TTP7h, CCP5h, CCP3h, CCP1h, CCP2h, CCP4h, CCP6h, TTP8h, CP5, CP3, CP1, CPz, CP2, CP4, CP6, CPP5h, CPP3h, CPP1h, CPP2h, CPP4h, CPP6h, P3, P1, Pz, P2, P4, PPO1h, PPO2h, eog-l, eog-m, eog-r, thumb_near, thumb_far, thumb_index, index_near, index_far, index_middle, middle_near, middle_far, middle_ring, ring_near, ring_far, ring_little, litte_near, litte_far, thumb_palm, wrist_bend, roll, pitch, gesture, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy, armeodummy
Creating raw.info structure...
/Users/clemens/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/contextlib.py:144: RuntimeWarning: Channel names are not unique, found duplicates for: {'armeodummy'}. Applying running numbers for duplicates.
  next(self.gen)

Or is it just my setup?

@larsoner larsoner merged commit 97f5b9c into mne-tools:main Oct 22, 2024
28 checks passed
@larsoner
Copy link
Member

Thanks @cbrnr !

@cbrnr cbrnr deleted the gdf-np2 branch October 23, 2024 05:34
@cbrnr
Copy link
Contributor Author

cbrnr commented Oct 23, 2024

I forgot to add the "backport-candidate" label to this PR (I just slapped it on the issue), so I assume this has not been backported automatically?

@larsoner larsoner added the backport-candidate on-merge: backport to maint/1.7 label Oct 23, 2024
@larsoner
Copy link
Member

@meeseeksdev backport to maint/1.8

meeseeksmachine pushed a commit to meeseeksmachine/mne-python that referenced this pull request Oct 23, 2024
larsoner pushed a commit that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate on-merge: backport to maint/1.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GDF reader incompatible with NumPy >= 2
3 participants