Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
b5897539
Commit
b5897539
authored
Oct 05, 2020
by
Pierre Paleo
Browse files
io.utils: add hdf5_entry_exists
parent
bba14ab3
Changes
1
Show whitespace changes
Inline
Side-by-side
nabu/io/utils.py
View file @
b5897539
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment