mne-python
mne-python copied to clipboard
EEGLAB file export data type issue
Reading a file exported by MNE on MATLAB
EEG.trials
ans =
int64
105
The type is int64 instead of double. This can cause all kinds of problems (I was trying to use the number of trials to calculate a ratio, and it was always returning the wrong value for example). This might be the case as well for other fields.
It could be argued that this is an issue with MATLAB. The number of trials is an integer number. Do integers need to be converted to floats when performing division etc.?
As a heavy (mostly ex-)MATLAB user, I would say it's quite unexpected that anything numeric is not double
in MATLAB. In this sense I am with @arnodelorme (and more than willing to defer to his expertise here!) that we should cast these to double. I'll reopen this in eeglabio
, though, which is where this change would need to happen (cc @jackz314 )