Skip to content

Error in "Spatiotemporal permutation F-test on full sensor data" tutorial #12927

Closed
@joebathelt

Description

@joebathelt

Proposed documentation enhancement

First, thank you for developing MNE-Python and for all the work that went into creating such comprehensive and useful tutorials.

I recently completed the spatiotemporal clustering tutorial for full sensor data using MNE version 1.8. However, when I reached the clustering step, I encountered an error at Line 312 that prevented the clustering from completing successfully:

Exception ignored in: 'scipy.sparse.csgraph._traversal._connected_components_undirected'
Traceback (most recent call last):
  File "/opt/homebrew/anaconda3/envs/LonelyEEG/lib/python3.11/site-packages/mne/stats/cluster_level.py", line 304, in _get_components
    _, components = connected_components(adjacency)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Buffer dtype mismatch, expected 'ITYPE_t' but got 'long'

It seems the issue is related to the format or type of the adjacency matrix, but I’m unsure how to resolve it. Could you please advise on what might be causing this error and any steps I could take to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions