We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d06c698 commit 6cc51f9Copy full SHA for 6cc51f9
src/zarr/core/group.py
@@ -3208,11 +3208,13 @@ async def create_hierarchy(
3208
nodes_parsed = _parse_hierarchy_dict(data=nodes_normed_keys)
3209
redundant_implicit_groups = []
3210
3211
- # empty hierarchies should be a no-op
3212
- if len(nodes_parsed) > 0:
+ try:
3213
# figure out which zarr format we are using
3214
zarr_format = next(iter(nodes_parsed.values())).zarr_format
3215
-
+ except StopIteration:
+ # empty hierarchies should be a no-op
3216
+ pass
3217
+ else:
3218
# check which implicit groups will require materialization
3219
implicit_group_keys = tuple(
3220
filter(lambda k: isinstance(nodes_parsed[k], ImplicitGroupMarker), nodes_parsed)
0 commit comments