Skip to content

Commit 5741db7

Browse files
add __repr__
1 parent ecebf20 commit 5741db7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mne/channels/interpolation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ class Interpolator(dict):
2626
def __init__(self, eeg, meg):
2727
dict.__init__(self, eeg=eeg, meg=meg)
2828

29+
def __repr__(self):
30+
desc = []
31+
if self['eeg'] is not None:
32+
desc.append('%i bad EEG' % (self['eeg'][1].sum(),))
33+
if self['meg'] is not None:
34+
desc.append('%i bad MEG' % (len(self['meg'][1]),))
35+
if not desc:
36+
desc.append('0 bad')
37+
"<Interpolator | %s>" % (', '.join(desc),)
38+
2939
def apply_in_place(self, inst):
3040
"""Dot product of channel mapping matrix to channel data."""
3141
if self['eeg'] is not None:

0 commit comments

Comments
 (0)