diff --git a/doc/changes/latest.inc b/doc/changes/latest.inc index 7f5ded56550..8a32d880e08 100644 --- a/doc/changes/latest.inc +++ b/doc/changes/latest.inc @@ -132,6 +132,8 @@ Bug - Fix default to be ``foreground=None`` in :func:`mne.viz.plot_source_estimates` to use white or black text based on the background color by `Eric Larson`_ +- Fix bug with writing EDF and CTF `mne.Info` to H5 format, e.g., with `mne.time_frequency.AverageTFR.save` by `Eric Larson`_ + - Fix bug with :func:`mne.io.Raw.plot` where toggling all projectors did not actually take effect by `Eric Larson`_ - Fix bug with :func:`mne.read_epochs` when loading data in complex format with ``preload=False`` by `Eric Larson`_ diff --git a/mne/io/ctf/info.py b/mne/io/ctf/info.py index e1f599aad96..e7c39d5b2f9 100644 --- a/mne/io/ctf/info.py +++ b/mne/io/ctf/info.py @@ -296,7 +296,7 @@ def _conv_comp(comp, first, last, chs): col_names = comp[first]['sensors'][:n_col] row_names = [comp[p]['sensor_name'] for p in range(first, last + 1)] mask = np.in1d(col_names, ch_names) # missing channels excluded - col_names = np.array(col_names)[mask] + col_names = np.array(col_names)[mask].tolist() n_col = len(col_names) n_row = len(row_names) ccomp = dict(ctfkind=np.array([comp[first]['coeff_type']]), diff --git a/mne/io/egi/egi.py b/mne/io/egi/egi.py index 0cc4bd16ecd..41df9eb7a2f 100644 --- a/mne/io/egi/egi.py +++ b/mne/io/egi/egi.py @@ -63,7 +63,6 @@ def my_fread(*x, **y): for event in range(info['n_events']): event_codes = ''.join(np.fromfile(fid, 'S1', 4).astype('U1')) info['event_codes'].append(event_codes) - info['event_codes'] = np.array(info['event_codes']) else: raise NotImplementedError('Only continuous files are supported') info['unsegmented'] = unsegmented diff --git a/mne/io/egi/events.py b/mne/io/egi/events.py index 2f4ee5f6170..7333b0089eb 100644 --- a/mne/io/egi/events.py +++ b/mne/io/egi/events.py @@ -25,7 +25,7 @@ def _read_events(input_fname, info): n_samples = info['last_samps'][-1] mff_events, event_codes = _read_mff_events(input_fname, info['sfreq']) info['n_events'] = len(event_codes) - info['event_codes'] = np.asarray(event_codes).astype('