diff --git a/eeglabio/epochs.py b/eeglabio/epochs.py index de47ca8..7d02168 100644 --- a/eeglabio/epochs.py +++ b/eeglabio/epochs.py @@ -108,8 +108,8 @@ def export_set(fname, data, sfreq, events, tmin, tmax, ch_names, event_id=None, pnts=float(data.shape[1]), trials=trials, srate=sfreq, - xmin=tmin, - xmax=tmax, + xmin=float(tmin), + xmax=float(tmax), ref=ref_channels, chanlocs=chanlocs, event=events, diff --git a/eeglabio/raw.py b/eeglabio/raw.py index 37cf11a..71e4c6a 100644 --- a/eeglabio/raw.py +++ b/eeglabio/raw.py @@ -64,8 +64,8 @@ def export_set(fname, data, sfreq, ch_names, ch_locs=None, annotations=None, ref_channels = " ".join(ref_channels) eeg_d = dict(data=data, setname=fname, nbchan=data.shape[0], - pnts=data.shape[1], trials=1, srate=sfreq, xmin=0, - xmax=data.shape[1] / sfreq, ref=ref_channels, + pnts=float(data.shape[1]), trials=1, srate=sfreq, xmin=0.0, + xmax=float(data.shape[1] / sfreq), ref=ref_channels, chanlocs=chanlocs, icawinv=[], icasphere=[], icaweights=[]) if annotations is not None: