Skip to content

mne.viz.plot_sensors accepts ch_groups in the type list (of lists) but this is undocumented  #11460

@mcvain

Description

@mcvain

Proposed documentation enhancement

The documentation of mne.viz.plot_sensors says that the ch_groups argument accepts ‘position’ | array of shape (n_ch_groups, n_picks) | None, which can be especially misleading when the user wants to create channel groups containing unequal numbers of channels. Following the documentation which specifies a fixed size of (n_ch_groups, n_picks), I believe the only way to do so currently is to pass an ndarray with invalid channel indices filling up the group(s) to match n_picks.

I initially edited the function so that it also works with an ndarray of dtype=object with unequal numbers of items in each row, but it turns out that the function already works with a list containing uneven-sized lists e.g. [[1, 2], [3, 4, 5, 6]] and therefore already supports channel groups with unequal sizes. This should be made clearer in the doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions