Skip to content

more consistent class instances/types #3781

@drammock

Description

@drammock

It is unintuitive and surprising (at least to me and @jasmainak) that:

my_epochs = mne.read_epochs('my_data-epo.fif.gz')
isinstance(my_epochs, mne.Epochs)  # returns False ?!!

It would be nice if mne.epochs.EpochsFIF were a subclass of mne.Epochs so that type checking were more straightforward. Similar argument applies to the various different types of Raw objects. @Eric89GXL has suggested (on Gitter) making _baseEpochs public as one solution, with a caveat in the docstring that it shouldn't be instantiated directly in user code.

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