zarr.open
zarr.open ¶
open(
store: StoreLike | None = None,
*,
mode: AccessModeLiteral | None = None,
zarr_format: ZarrFormat | None = None,
path: str | None = None,
storage_options: dict[str, Any] | None = None,
**kwargs: Any,
) -> AnyArray | Group
Open a group or array using file-mode-like semantics.
Parameters:
-
store(StoreLike or None, default:None) –StoreLike object to open. See the storage documentation in the user guide for a description of all valid StoreLike values.
-
mode(('r', 'r+', 'a', 'w', 'w-'), default:'r') –Persistence mode: 'r' means read only (must exist); 'r+' means read/write (must exist); 'a' means read/write (create if doesn't exist); 'w' means create (overwrite if exists); 'w-' means create (fail if exists). If the store is read-only, the default is 'r'; otherwise, it is 'a'.
-
zarr_format((2, 3, None), default:2) –The zarr format to use when saving.
-
path(str or None, default:None) –The path within the store to open.
-
storage_options(dict, default:None) –If using an fsspec URL to create the store, these will be passed to the backend implementation. Ignored otherwise.
-
**kwargs(Any, default:{}) –Additional parameters are passed through to
zarr.open_arrayorzarr.open_group.
Returns:
See Also
load
Notes
open returns a lazy Array or Group backed by
the store, so data is read and written incrementally. Use load
instead when you want the data eagerly read into an in-memory array (a
NumPy array by default).