Skip to content

Fix pop_select dialog crash on numpy chanlocs#231

Open
claude[bot] wants to merge 2 commits into
developfrom
agent/20260613-fix-229
Open

Fix pop_select dialog crash on numpy chanlocs#231
claude[bot] wants to merge 2 commits into
developfrom
agent/20260613-fix-229

Conversation

@claude

@claude claude Bot commented Jun 13, 2026

Copy link
Copy Markdown

Normalize channel locations with the shared chanlocs_as_list helper anywhere GUI/display helpers consume EEG chanlocs, including pop_select, pop_rejcont, pop_rmbase, firfilt dialogs/filter channel-type selection, clean_rawdata artifact diagnostics, and ICLabel channel dashboards. This prevents numpy ndarray truth-value crashes after eeg_checkset and adds regression coverage for the affected user-facing paths.

Validation:

  • uv run --no-sync pytest tests/test_gui_pop_select.py tests/test_rejection_workflows.py tests/test_pop_rmbase.py tests/test_gui_pop_firfilt.py tests/test_gui_pop_clean_rawdata.py tests/test_pop_prop_extended.py
  • uv run --no-sync ruff check
  • uv run --no-sync ruff format --check
  • ./pre-commit.py

Note: uv run --no-sync ty check still reports the existing optional Torch import baseline in ICLabel/tooling in this worktree.

Fixes #229

pop_select_dialog_spec used `EEG.get("chanlocs", []) or []`, which raises
`ValueError: The truth value of an array with more than one element is
ambiguous` on the numpy object array that eeg_checkset stores. Loading
sample_data/eeglab_data.set and opening the Select data dialog hit this
path. Route the chanlocs lookup through the shared chanlocs_as_list
helper and cover the ndarray storage with a regression test.

Fixes #229
@claude claude Bot mentioned this pull request Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pop_select issue

1 participant