Skip to content

Commit 94afff7

Browse files
author
Fabricio Arend Torres
committed
docs: Clarified laziness of create_hierarchy (zarr-developers#2938)
1 parent 9e8b50a commit 94afff7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/zarr/core/sync_group.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ def create_hierarchy(
5555
overwrite: bool = False,
5656
) -> Iterator[tuple[str, Group | Array]]:
5757
"""
58-
Create a complete zarr hierarchy from a collection of metadata objects.
58+
Lazily create a complete zarr hierarchy from a collection of metadata objects.
5959
6060
This function will parse its input to ensure that the hierarchy is complete. Any implicit groups
6161
will be inserted as needed. For example, an input like
6262
```{'a/b': GroupMetadata}``` will be parsed to
6363
```{'': GroupMetadata, 'a': GroupMetadata, 'b': Groupmetadata}```
6464
65-
After input parsing, this function then creates all the nodes in the hierarchy concurrently.
65+
This function returns a generator that will create the nodes in the hierarchy
66+
when consumed. After input parsing, this function then creates all the nodes in the hierarchy concurrently.
6667
6768
Arrays and Groups are yielded in the order they are created. This order is not stable and
6869
should not be relied on.

0 commit comments

Comments
 (0)