Skip to content

Commit

Permalink
Fix bug (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jun 6, 2024
1 parent 8c614b0 commit 8aa7621
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion h5io_browser/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def read_dict_from_hdf(
return_dict = _merge_nested_dict(
main_dict=return_dict,
add_dict=_get_nested_dict_item(
key=n[1:],
key=n,
value=_read_hdf(hdf_filehandle=hdf, h5_path=n, slash=slash),
),
)
Expand Down Expand Up @@ -172,6 +172,8 @@ def _get_nested_dict_item(key, value):
dict: hierarchical dictionary
"""
groups = key.split("/")
if groups[0] == "":
del groups[0]
nested_dict = value
for g in groups[::-1]:
nested_dict = {g: nested_dict}
Expand Down

0 comments on commit 8aa7621

Please sign in to comment.