epochs should throw an error if labels doesn't exist

Let's say you have an epochs object which you believe has labels 'foo' and
'bar', but really 'bar' doesn't exist as a label in the object.

epochs['bar'].average() throws an error, which seems reasonable

epochs[['foo', 'bar']].average() does not throw an error and might be
responsible for creating a whole field of brain science based on false
results :wink:

This is 0.13.1

-Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180410/1031bcb0/attachment.html

hi,

I create the issue

https://github.com/mne-tools/mne-python/issues/5117

thanks for the bug report.

Alex