add_data_from_dir
- MPPData.add_data_from_dir(data_dir, keys=(), optional_keys=(), subset=False, **kwargs)[source]
Add data to MPPData from
data_dir.Expects
x,y, andobj_idsto be present indata_dir. Assumes that the data indata_diruses the samedata_configas the present object.- Parameters
data_dir (
str) – Full path to the dir containing the numpy files to be loaded.keys (
Iterable[str]) – Filenames of data that should be loadedoptional_keys (
Iterable[str]) – Filenames of data that could optionally be loaded if presentsubset (
bool) – IfTrue, subsetMPPDatato data present indata_dir.kwargs (
Any) – Passed toMPPData.from_data_dir(), i.e., seed.
- Return type
Nothing, modifies
MPPDatain place. AddskeystoMPPData.data().- Raises
ValueError – If
subsetis False, and data indata_dirdiffers from data inself.