Skip to content

Baseline must be a tuple? #11711

Closed
Closed

Description

@cbrnr

I was wondering if forcing the baseline argument to be a tuple is necessary and/or added on purpose in #9210 (https://github.com/mne-tools/mne-python/blob/main/mne/baseline.py#L178). I usually tend to use lists, and this used to work before this change. Now, a tuple is required. @hoechenberger? cf cbrnr/mnelab#381

Activity

  1. hoechenberger commented on May 29, 2023

    @hoechenberger
    Member

    We always explicitly requested baseline to be a tuple as per the API docs, so I suppose this change you mentioned is just to ensure that the output (in the .baseline attribute) equals the input provided by the user. I think it'd be good to support array-like of length 2 as input and cast to a tuple internally

  2. cbrnr commented on May 29, 2023

    @cbrnr
    ContributorAuthor

    Yes, I'd also prefer list-like with two elements if there is no strong reason to require a tuple. If everyone agrees I can submit a PR.

  3. agramfort commented on May 29, 2023

    @agramfort
    SponsorMember
  4. linked a pull request that will close this issueAdd "array-like" to `_validate_type()` #11713on May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions