Keep data loaded when get_data is called
This commit is contained in:
parent
db593d0bb5
commit
07828e41c9
@ -129,10 +129,17 @@ class DataCollector:
|
||||
file.write(self.to_csv(sep=sep))
|
||||
|
||||
def get_data(self) -> tuple[np.ndarray, dict]:
|
||||
"""
|
||||
Load the full data and return it together with the metadata
|
||||
Returns
|
||||
-------
|
||||
tuple[np.ndarray, dict]
|
||||
The full data and the metadata
|
||||
"""
|
||||
if self.fulldata is None:
|
||||
return DataCollector.load_data_from_dir(self.dirpath)
|
||||
else:
|
||||
return self.fulldata, self.metadata
|
||||
self.fulldata, new_mdata = DataCollector.load_data_from_dir(self.dirpath)
|
||||
self.metadata |= new_mdata
|
||||
return self.fulldata, self.metadata
|
||||
|
||||
@staticmethod
|
||||
def get_csv(data, metadata, sep=","):
|
||||
|
Loading…
x
Reference in New Issue
Block a user