@@ -1174,29 +1174,32 @@ def require_dataset(
11741174 dtype : npt .DTypeLike = None ,
11751175 exact : bool = False ,
11761176 ** kwargs : Any ,
1177- ) -> AsyncArray [ ArrayV2Metadata ] | AsyncArray [ ArrayV3Metadata ] :
1177+ ) -> Array :
11781178 """Obtain an array, creating if it doesn't exist.
11791179
11801180 .. deprecated:: 3.0.0
11811181 The h5py compatibility methods will be removed in 3.1.0. Use `Group.require_array` instead.
11821182
11831183 Arrays are known as "datasets" in HDF5 terminology. For compatibility
1184- with h5py, Zarr groups also implement the :func:`zarr.AsyncGroup .create_dataset` method.
1184+ with h5py, Zarr groups also implement the :func:`zarr.Group .create_dataset` method.
11851185
1186- Other `kwargs` are as per :func:`zarr.AsyncGroup .create_array`.
1186+ Other `kwargs` are as per :func:`zarr.Group .create_array`.
11871187
11881188 Parameters
11891189 ----------
11901190 name : str
11911191 Array name.
11921192 shape : int or tuple of ints
11931193 Array shape.
1194- **kwargs
1195- Additional keyword arguments passed to :func:`zarr.AsyncGroup.create_array`.
1194+ dtype : str or dtype, optional
1195+ NumPy dtype. If None, the dtype will be inferred from the existing array.
1196+ exact : bool, optional
1197+ If True, require `dtype` to match exactly. If False, require
1198+ `dtype` can be cast from array dtype.
11961199
11971200 Returns
11981201 -------
1199- a : AsyncArray
1202+ a : Array
12001203 """
12011204 return self .require_array (name , shape = shape , dtype = dtype , exact = exact , ** kwargs )
12021205
@@ -2554,9 +2557,9 @@ def require_dataset(
25542557 shape : int or tuple of ints
25552558 Array shape.
25562559 dtype : str or dtype, optional
2557- NumPy dtype.
2560+ NumPy dtype. If None, the dtype will be inferred from the existing array.
25582561 exact : bool, optional
2559- If True, require `dtype` to match exactly. If false , require
2562+ If True, require `dtype` to match exactly. If False , require
25602563 `dtype` can be cast from array dtype.
25612564
25622565 Returns
@@ -2592,9 +2595,15 @@ def require_array(
25922595
25932596 Returns
25942597 -------
2595- a : Array
2598+ a : AsyncArray
25962599 """
2597- return Array (self ._sync (self ._async_group .require_array (name , shape = shape , dtype = dtype , exact = exact , ** kwargs )))
2600+ return Array (
2601+ self ._sync (
2602+ self ._async_group .require_array (
2603+ name , shape = shape , dtype = dtype , exact = exact , ** kwargs
2604+ )
2605+ )
2606+ )
25982607
25992608 @_deprecate_positional_args
26002609 def empty (self , * , name : str , shape : ChunkCoords , ** kwargs : Any ) -> Array :
0 commit comments