mne-tools / mne-tools/mne-python

BUG: Wrong output for adjacency=False

Open
#12,613 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Regarding the API, there is already a test test_output_equiv to which I added the threshold parameter to be tested.
However, I also noticed the False value for adjacency was not tested and indeed there are problems here:

  • adjacency=False runs only for 1D inputs (which I think is not expected)
  • for 1D input, the output is always "indices" whatever is out_type

I guess it is rarely used... Should this be corrected in the same or another PR?

Originally posted by @nfourcau in https://github.com/mne-tools/mne-python/pull/12609#discussion_r1603338916

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing test_output_equiv test and the API implementation it exercises, then run the relevant test with adjacency=False. Done means adjacency=False is not limited to 1D inputs and the 1D output respects the requested out_type rather than always returning indices.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.