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
d1323365
Commit
d1323365
authored
May 11, 2021
by
Pierre Paleo
Browse files
dicttoh5: use update_mode instead of overwrite_data
parent
db57a92a
Changes
1
Hide whitespace changes
Inline
Side-by-side
nabu/io/config.py
View file @
d1323365
...
...
@@ -228,6 +228,10 @@ def export_dict_to_h5(dic, h5file, h5path, overwrite_data=True, mode="a"):
mode: str, optional
File mode. Default is "a" (append).
"""
# in silx >= 0.15, overwrite_data = True becomes update_mode='modify
# and overwrite_data=False becomes update_mode='add'
update_mode
=
[
"add"
,
"modify"
][
overwrite_data
]
#
modified_dic
=
convert_dict_values
(
dic
,
{
None
:
"None"
},
...
...
@@ -236,7 +240,7 @@ def export_dict_to_h5(dic, h5file, h5path, overwrite_data=True, mode="a"):
modified_dic
,
h5file
=
h5file
,
h5path
=
h5path
,
overwrite_data
=
overwrite_data
,
update_mode
=
update_mode
,
mode
=
mode
)
...
...
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