@@ -1148,6 +1148,9 @@ async def create_dataset(
1148
1148
) -> AsyncArray [ArrayV2Metadata ] | AsyncArray [ArrayV3Metadata ]:
1149
1149
"""Create an array.
1150
1150
1151
+ .. deprecated:: 3.0.0
1152
+ The h5py compatibility methods will be removed in 3.1.0. Use `AsyncGroup.create_array` instead.
1153
+
1151
1154
Arrays are known as "datasets" in HDF5 terminology. For compatibility
1152
1155
with h5py, Zarr groups also implement the :func:`zarr.AsyncGroup.require_dataset` method.
1153
1156
@@ -1161,9 +1164,6 @@ async def create_dataset(
1161
1164
Returns
1162
1165
-------
1163
1166
a : AsyncArray
1164
-
1165
- .. deprecated:: 3.0.0
1166
- The h5py compatibility methods will be removed in 3.1.0. Use `AsyncGroup.create_array` instead.
1167
1167
"""
1168
1168
data = kwargs .pop ("data" , None )
1169
1169
# create_dataset in zarr 2.x requires shape but not dtype if data is
@@ -1188,6 +1188,9 @@ async def require_dataset(
1188
1188
) -> AsyncArray [ArrayV2Metadata ] | AsyncArray [ArrayV3Metadata ]:
1189
1189
"""Obtain an array, creating if it doesn't exist.
1190
1190
1191
+ .. deprecated:: 3.0.0
1192
+ The h5py compatibility methods will be removed in 3.1.0. Use `AsyncGroup.require_dataset` instead.
1193
+
1191
1194
Arrays are known as "datasets" in HDF5 terminology. For compatibility
1192
1195
with h5py, Zarr groups also implement the :func:`zarr.AsyncGroup.create_dataset` method.
1193
1196
@@ -1208,9 +1211,6 @@ async def require_dataset(
1208
1211
Returns
1209
1212
-------
1210
1213
a : AsyncArray
1211
-
1212
- .. deprecated:: 3.0.0
1213
- The h5py compatibility methods will be removed in 3.1.0. Use `AsyncGroup.require_dataset` instead.
1214
1214
"""
1215
1215
return await self .require_array (name , shape = shape , dtype = dtype , exact = exact , ** kwargs )
1216
1216
@@ -2402,6 +2402,10 @@ def create_array(
2402
2402
def create_dataset (self , name : str , ** kwargs : Any ) -> Array :
2403
2403
"""Create an array.
2404
2404
2405
+ .. deprecated:: 3.0.0
2406
+ The h5py compatibility methods will be removed in 3.1.0. Use `Group.create_array` instead.
2407
+
2408
+
2405
2409
Arrays are known as "datasets" in HDF5 terminology. For compatibility
2406
2410
with h5py, Zarr groups also implement the :func:`zarr.Group.require_dataset` method.
2407
2411
@@ -2415,16 +2419,16 @@ def create_dataset(self, name: str, **kwargs: Any) -> Array:
2415
2419
Returns
2416
2420
-------
2417
2421
a : Array
2418
-
2419
- .. deprecated:: 3.0.0
2420
- The h5py compatibility methods will be removed in 3.1.0. Use `Group.create_array` instead.
2421
2422
"""
2422
2423
return Array (self ._sync (self ._async_group .create_dataset (name , ** kwargs )))
2423
2424
2424
2425
@deprecated ("Use Group.require_array instead." )
2425
2426
def require_dataset (self , name : str , * , shape : ShapeLike , ** kwargs : Any ) -> Array :
2426
2427
"""Obtain an array, creating if it doesn't exist.
2427
2428
2429
+ .. deprecated:: 3.0.0
2430
+ The h5py compatibility methods will be removed in 3.1.0. Use `Group.require_array` instead.
2431
+
2428
2432
Arrays are known as "datasets" in HDF5 terminology. For compatibility
2429
2433
with h5py, Zarr groups also implement the :func:`zarr.Group.create_dataset` method.
2430
2434
@@ -2440,9 +2444,6 @@ def require_dataset(self, name: str, *, shape: ShapeLike, **kwargs: Any) -> Arra
2440
2444
Returns
2441
2445
-------
2442
2446
a : Array
2443
-
2444
- .. deprecated:: 3.0.0
2445
- The h5py compatibility methods will be removed in 3.1.0. Use `Group.require_array` instead.
2446
2447
"""
2447
2448
return Array (self ._sync (self ._async_group .require_array (name , shape = shape , ** kwargs )))
2448
2449
@@ -2669,6 +2670,9 @@ def array(
2669
2670
) -> Array :
2670
2671
"""Create an array within this group.
2671
2672
2673
+ .. deprecated:: 3.0.0
2674
+ Use `Group.create_array` instead.
2675
+
2672
2676
This method lightly wraps :func:`zarr.core.array.create_array`.
2673
2677
2674
2678
Parameters
0 commit comments