Commit b5897539 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

io.utils: add hdf5_entry_exists

parent bba14ab3
......@@ -105,6 +105,11 @@ def get_first_hdf5_entry(fname):
return entry
def hdf5_entry_exists(fname, entry):
with HDF5File(fname, "r") as fid:
res = fid.get(entry, None) is not None
return res
def get_h5_value(fname, h5_path, default_ret=None):
with HDF5File(fname, "r") as fid:
try:
......
Supports Markdown
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