This commit is contained in:
2022-06-01 11:40:48 -05:00
parent 3fd252659e
commit 6cc253a903
15 changed files with 591 additions and 275 deletions

View File

@@ -224,3 +224,9 @@ class Hdf5Sample(Sample):
value, (bytes, bytearray)
), f"bytes expected; found: {value.__class__}" # type: ignore
self.put_array(key, np.frombuffer(value, dtype="uint8"))
def __enter__(self):
return self
def __exit__(self, type, value, traceback):
self.file.close()