skip entries that cannot be written with a printed warning
This commit is contained in:
@ -5,7 +5,10 @@ def write_dict(fn, d):
|
||||
d = flatten_dict(d)
|
||||
with h5py.File(fn, "w") as f:
|
||||
for k, v in d.items():
|
||||
f[k] = v
|
||||
try:
|
||||
f[k] = v
|
||||
except Exception:
|
||||
print("could not store:", k, "<<", v)
|
||||
|
||||
|
||||
def flatten_dict(d, parent="", sep="/"):
|
||||
|
Reference in New Issue
Block a user