Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
d-v-b committed Feb 2, 2025
1 parent 9b97c95 commit e546519
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/zarr/core/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -3432,15 +3432,37 @@ def _build_node(

async def _read_node_v2(store: Store, path: str) -> AsyncArray[ArrayV2Metadata] | AsyncGroup:
"""
Read a Zarr v2 AsyncArray or AsyncGroup from a location defined by a StorePath.
Read a Zarr v2 AsyncArray or AsyncGroup from a path in a Store.
Parameters
----------
store : Store
The store-like object to read from.
path : str
The path to the node to read.
Returns
-------
AsyncArray | AsyncGroup
"""
metadata = await _read_metadata_v2(store=store, path=path)
return _build_node(store=store, path=path, metadata=metadata)


async def _read_node_v3(store: Store, path: str) -> AsyncArray[ArrayV3Metadata] | AsyncGroup:
"""
Read a Zarr v3 AsyncArray or AsyncGroup from a location defined by a StorePath.
Read a Zarr v3 AsyncArray or AsyncGroup from a path in a Store.
Parameters
----------
store : Store
The store-like object to read from.
path : str
The path to the node to read.
Returns
-------
AsyncArray | AsyncGroup
"""
metadata = await _read_metadata_v3(store=store, path=path)
return _build_node(store=store, path=path, metadata=metadata)
Expand Down

0 comments on commit e546519

Please sign in to comment.