add exclude param to Raw, Epochs and Evokeds - #14225
Merged
larsoner merged 16 commits intoAug 28, 2026
Merged
Conversation
CarinaFo
requested review from
agramfort,
drammock and
mscheltienne
as code owners
August 26, 2026 11:44
larsoner
requested changes
Aug 26, 2026
| def get_data( | ||
| self, | ||
| picks: str | np.ndarray | slice | None = None, | ||
| exclude: list[str] | Literal["bads"] = "bads", |
Member
There was a problem hiding this comment.
This is backward incompatible in this location because someone might have done
inst.get_data("meg", 0, 1) for example. This new param should go after the *
| self, | ||
| out=True, | ||
| picks=None, | ||
| exclude="bads", |
Member
There was a problem hiding this comment.
Looking below it looks like the old default was ()
Suggested change
| exclude="bads", | |
| exclude=(), |
Can you double check the others, too? (Some of them are only implicit so might require a bit of digging)
larsoner
reviewed
Aug 26, 2026
| def get_data( | ||
| self, | ||
| picks: str | np.ndarray | slice | None = None, | ||
| exclude: list[str] | Literal["bads"] = "bads", |
Member
There was a problem hiding this comment.
This one I think needs to be () as well
Member
There was a problem hiding this comment.
... and move later in the signature
larsoner
approved these changes
Aug 28, 2026
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
larsoner
enabled auto-merge (squash)
August 28, 2026 09:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12577
First step to fix #13946 and #12197
Fix the inconsistencies mentioned in the issues above.
Currently, not every data object has a public exclude parameter in .get_data(), this is being addressed here.
The default behaviour is not changed in this PR (the Epochs object is an outlier, this will be addressed in a future PR).
To be discussed: default for exclude as this will require a deprecation cycle and is not consistent between objects.