Add preload keyward argument to Inst.load_data() method call
Preload keyward argument is available only in mne read_* functions. If you want to load data into a memeory mapped file, you have to call one of those functions. There is no way to do it after instanization of the class without playing around with private properites or methods.
#use cases: raw is a copy, or returned from some other function.
raw._data = np.memmap(path, shape, dtype)
Raw.preload = True
# or using self._preload_data which load_data actually calls
raw._preload_data(preload=path)
Adding preload as a keyward argument would prevent users from playing around with private members
Okay for me to add a str arg to .load_data for whichever classes already support memmapping (at least raw, maybe Epochs?). Calling it preload would be consistent with what it's called in read_raw_*, but seems like a bit of a misnomer here. I think .load_data(memmap=None | Path-like) might make more sense here
Okay for me to add a
strarg to.load_datafor whichever classes already support memmapping (at least raw, maybe Epochs?). Calling itpreloadwould be consistent with what it's called inread_raw_*, but seems like a bit of a misnomer here. I think.load_data(memmap=None | Path-like)might make more sense here
Yes that was my thinking also. memmap would be a bit more informative.
@KareemShalabi are you planning to work on this ? Please let me know, if there are any updates from your side. Thanks 😊