diff --git a/mne_bids/copyfiles.py b/mne_bids/copyfiles.py index 49a14fc0e..323ef3cfd 100644 --- a/mne_bids/copyfiles.py +++ b/mne_bids/copyfiles.py @@ -533,7 +533,7 @@ def copyfile_eeglab(src, dest): # structure and potentially breaks re-reading of the file uint16_codec = None eeg = loadmat(file_name=src, simplify_cells=False, - appendmat=False, uint16_codec=uint16_codec) + appendmat=False, uint16_codec=uint16_codec, mat_dtype=True) oldstyle = False if 'EEG' in eeg: eeg = eeg['EEG'] @@ -564,15 +564,6 @@ def copyfile_eeglab(src, dest): new_value[0, 0] = np.atleast_1d(np.array(tail)) eeg['data'] = new_value - # Make sure all values are saved as float - # (see https://github.com/mne-tools/mne-bids/issues/1122) - eeg['nbchan'] = float(eeg['nbchan']) - eeg['pnts'] = float(eeg['pnts']) - eeg['trials'] = float(eeg['trials']) - eeg['srate'] = float(eeg['srate']) - eeg['xmin'] = float(eeg['xmin']) - eeg['xmax'] = float(eeg['xmax']) - # Save the EEG dictionary as a Matlab struct again mdict = dict(EEG=eeg) if oldstyle else eeg savemat(file_name=dest, mdict=mdict, appendmat=False)