diff --git a/src/zarr/api/synchronous.py b/src/zarr/api/synchronous.py index 50a1c0fa20..db113f76d0 100644 --- a/src/zarr/api/synchronous.py +++ b/src/zarr/api/synchronous.py @@ -783,13 +783,12 @@ def create_array( The name of the array within the store. If ``name`` is ``None``, the array will be located at the root of the store. shape : ChunkCoords, optional - Shape of the array. Can be ``None`` if ``data`` is provided. + Shape of the array. Must be ``None`` if ``data`` is provided. dtype : ZDTypeLike, optional - Data type of the array. Can be ``None`` if ``data`` is provided. + Data type of the array. Must be ``None`` if ``data`` is provided. data : np.ndarray, optional Array-like data to use for initializing the array. If this parameter is provided, the - ``shape`` and ``dtype`` parameters must be identical to ``data.shape`` and ``data.dtype``, - or ``None``. + ``shape`` and ``dtype`` parameters must be ``None``. chunks : ChunkCoords, optional Chunk shape of the array. If not specified, default are guessed based on the shape and dtype. diff --git a/src/zarr/core/group.py b/src/zarr/core/group.py index 4bdc7b549f..9ef8481b9a 100644 --- a/src/zarr/core/group.py +++ b/src/zarr/core/group.py @@ -2476,12 +2476,11 @@ def create_array( The name of the array relative to the group. If ``path`` is ``None``, the array will be located at the root of the store. shape : ChunkCoords, optional - Shape of the array. Can be ``None`` if ``data`` is provided. + Shape of the array. Must be ``None`` if ``data`` is provided. dtype : npt.DTypeLike | None - Data type of the array. Can be ``None`` if ``data`` is provided. + Data type of the array. Must be ``None`` if ``data`` is provided. data : Array-like data to use for initializing the array. If this parameter is provided, the - ``shape`` and ``dtype`` parameters must be identical to ``data.shape`` and ``data.dtype``, - or ``None``. + ``shape`` and ``dtype`` parameters must be ``None``. chunks : ChunkCoords, optional Chunk shape of the array. If not specified, default are guessed based on the shape and dtype.