Skip to content

Add preload keyward argument to Inst.load_data() method call #13845

Description

@KareemShalabi

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions