zarr.load
zarr.load ¶
load(
store: StoreLike,
path: str | None = None,
zarr_format: ZarrFormat | None = None,
) -> NDArrayLikeOrScalar | dict[str, NDArrayLikeOrScalar]
Load data from an array or group into memory.
Parameters:
-
store(StoreLike) –StoreLike object to open. See the storage documentation in the user guide for a description of all valid StoreLike values.
-
path(str or None, default:None) –The path within the store from which to load.
Returns:
-
out–If the path contains an array, out will be a numpy array. If the path contains a group, out will be a dict-like object where keys are array names and values are numpy arrays.
See Also
save, savez, open
Notes
If loading data from a group of arrays, data will not be immediately loaded into memory. Rather, arrays will be loaded into memory as they are requested.
Unlike open, which returns a lazy Array or
Group backed by the store, load eagerly reads the data and
returns it as an in-memory array (or a dict of arrays for a group).
The array type is NumPy by default, but follows the configured
buffer prototype (for example, CuPy for GPU use cases).
Use open when you want to read or write data incrementally without loading it
all into memory.