more consistent class instances/types
See original GitHub issueIt 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:30 (30 by maintainers)
Top Results From Across the Web
Instance types - Amazon Elastic Compute Cloud
Type Sizes Use case
D2 d2.xlarge | d2.2xlarge | d2.4xlarge | d2.8xlarge Storage optimized
D3 d3.xlarge | d3.2xlarge | d3.4xlarge | d3.8xlarge Storage optimized
DL1 dl1.24xlarge...
Read more >AWS Instance Types Explained: The Best Time To Use Each
AWS instances are available in a multitude of capabilities. Learn more about each instance type and the best time to use each.
Read more >Amazon EC2 Instance Types
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instance types comprise varying combinations of CPU, memory, ......
Read more >Consistent Class and Interface Terminology
Variables of a class type can reference an instance of that class or ... A class that implements one or more interfaces may...
Read more >AWS EC2 Instance Types: Comparison and Use Cases
Such an application is likely to experience a relatively consistent load most of the time but may see spikes in demand when an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To be fair, the issue of “magic” is orthogonal to the issue of adding a method; the method could in principle be set to require the same input as the current constructor (minus the Raw instance), and we have recently simplified the current constructor to perform some magic.
@drammock let’s not try to overfit and be perfect. Perfect is the enemy of good (and also done) 😃 These things are not obvious when you start a library and it is only apparent in retrospect. We should be a bit more patient before suggesting an overhaul. There are many more urgent things to be done than a class overhaul for a GSoC. I’m sure we can live with minor inconveniences.
Among the suggestions so far, I like my own
epochs_types
of course – because it has a ring of familiarity and also because it offers a public API without exposing the entire class. But I can also live with making_BaseEpochs
public if this is what everyone prefers. Please make a PR if you are up for it!