Skip to content
Snippets Groups Projects
Commit ac40734f authored by Dennis Noll's avatar Dennis Noll
Browse files

[data] DSSDisk: flush array to disk

parent 2f6bc5d1
No related branches found
No related tags found
No related merge requests found
......@@ -249,5 +249,6 @@ class DSSDisk(DSS):
if isinstance(value, np.ndarray) and not isinstance(value, np.memmap):
with tempfile.NamedTemporaryFile() as tmp_file:
np.save(tmp_file, value)
tmp_file.flush()
value = np.load(tmp_file.name, mmap_mode="r+")
return super().__setitem__(key, value)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment