Commit a165d784 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[core][dataset][data] Don't load all dataset at once

parent f20cfa57
Pipeline #53241 passed with stage
in 2 minutes and 11 seconds
......@@ -1488,7 +1488,9 @@ class Data(numpy.ndarray):
if new_shape != _file["dataset"].shape:
_file.create_dataset("update_dataset", new_shape, dtype=self.dtype)
else:
_file.create_dataset("update_dataset", data=_file["dataset"])
_file.create_dataset("update_dataset", shape=_file["dataset"].shape, dtype=_file["dataset"].dtype)
for i, img in enumerate(_file["dataset"]):
_file["update_dataset"][i] = img
dataset_name = "update_dataset"
else:
new_shape = self.shape if new_shape is None else new_shape
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment