diff --git a/mne_qt_browser/_pg_figure.py b/mne_qt_browser/_pg_figure.py index a794ac20..17a0bdd1 100644 --- a/mne_qt_browser/_pg_figure.py +++ b/mne_qt_browser/_pg_figure.py @@ -8,6 +8,7 @@ import datetime import functools import gc +import inspect import math import platform import sys @@ -2948,10 +2949,13 @@ def run(self): stop = start + chunk_size # Load epochs if self.mne.is_epochs: + kwargs = dict() + if "copy" in inspect.getfullargspec(self.mne.inst.get_data).kwonlyargs: + kwargs["copy"] = False item = slice(start, stop) with self.mne.inst.info._unlock(): data_chunk = np.concatenate( - self.mne.inst.get_data(item=item), axis=-1 + self.mne.inst.get_data(item=item, **kwargs), axis=-1 ) # Load raw else: