15
15
from typing_extensions import deprecated
16
16
17
17
import zarr .api .asynchronous as async_api
18
- from zarr ._compat import _deprecate_positional_args
19
18
from zarr .abc .metadata import Metadata
20
19
from zarr .abc .store import Store , set_or_delete
21
20
from zarr .core ._info import GroupInfo
@@ -2417,7 +2416,6 @@ def create(self, *args: Any, **kwargs: Any) -> Array:
2417
2416
# Backwards compatibility for 2.x
2418
2417
return self .create_array (* args , ** kwargs )
2419
2418
2420
- @_deprecate_positional_args
2421
2419
def create_array (
2422
2420
self ,
2423
2421
name : str ,
@@ -2635,7 +2633,6 @@ def require_array(self, name: str, *, shape: ShapeLike, **kwargs: Any) -> Array:
2635
2633
"""
2636
2634
return Array (self ._sync (self ._async_group .require_array (name , shape = shape , ** kwargs )))
2637
2635
2638
- @_deprecate_positional_args
2639
2636
def empty (self , * , name : str , shape : ChunkCoords , ** kwargs : Any ) -> Array :
2640
2637
"""Create an empty array with the specified shape in this Group. The contents will be filled with
2641
2638
the array's fill value or zeros if no fill value is provided.
@@ -2657,7 +2654,6 @@ def empty(self, *, name: str, shape: ChunkCoords, **kwargs: Any) -> Array:
2657
2654
"""
2658
2655
return Array (self ._sync (self ._async_group .empty (name = name , shape = shape , ** kwargs )))
2659
2656
2660
- @_deprecate_positional_args
2661
2657
def zeros (self , * , name : str , shape : ChunkCoords , ** kwargs : Any ) -> Array :
2662
2658
"""Create an array, with zero being used as the default value for uninitialized portions of the array.
2663
2659
@@ -2677,7 +2673,6 @@ def zeros(self, *, name: str, shape: ChunkCoords, **kwargs: Any) -> Array:
2677
2673
"""
2678
2674
return Array (self ._sync (self ._async_group .zeros (name = name , shape = shape , ** kwargs )))
2679
2675
2680
- @_deprecate_positional_args
2681
2676
def ones (self , * , name : str , shape : ChunkCoords , ** kwargs : Any ) -> Array :
2682
2677
"""Create an array, with one being used as the default value for uninitialized portions of the array.
2683
2678
@@ -2697,7 +2692,6 @@ def ones(self, *, name: str, shape: ChunkCoords, **kwargs: Any) -> Array:
2697
2692
"""
2698
2693
return Array (self ._sync (self ._async_group .ones (name = name , shape = shape , ** kwargs )))
2699
2694
2700
- @_deprecate_positional_args
2701
2695
def full (
2702
2696
self , * , name : str , shape : ChunkCoords , fill_value : Any | None , ** kwargs : Any
2703
2697
) -> Array :
@@ -2725,7 +2719,6 @@ def full(
2725
2719
)
2726
2720
)
2727
2721
2728
- @_deprecate_positional_args
2729
2722
def empty_like (self , * , name : str , data : async_api .ArrayLike , ** kwargs : Any ) -> Array :
2730
2723
"""Create an empty sub-array like `data`. The contents will be filled
2731
2724
with the array's fill value or zeros if no fill value is provided.
@@ -2752,7 +2745,6 @@ def empty_like(self, *, name: str, data: async_api.ArrayLike, **kwargs: Any) ->
2752
2745
"""
2753
2746
return Array (self ._sync (self ._async_group .empty_like (name = name , data = data , ** kwargs )))
2754
2747
2755
- @_deprecate_positional_args
2756
2748
def zeros_like (self , * , name : str , data : async_api .ArrayLike , ** kwargs : Any ) -> Array :
2757
2749
"""Create a sub-array of zeros like `data`.
2758
2750
@@ -2773,7 +2765,6 @@ def zeros_like(self, *, name: str, data: async_api.ArrayLike, **kwargs: Any) ->
2773
2765
2774
2766
return Array (self ._sync (self ._async_group .zeros_like (name = name , data = data , ** kwargs )))
2775
2767
2776
- @_deprecate_positional_args
2777
2768
def ones_like (self , * , name : str , data : async_api .ArrayLike , ** kwargs : Any ) -> Array :
2778
2769
"""Create a sub-array of ones like `data`.
2779
2770
@@ -2793,7 +2784,6 @@ def ones_like(self, *, name: str, data: async_api.ArrayLike, **kwargs: Any) -> A
2793
2784
"""
2794
2785
return Array (self ._sync (self ._async_group .ones_like (name = name , data = data , ** kwargs )))
2795
2786
2796
- @_deprecate_positional_args
2797
2787
def full_like (self , * , name : str , data : async_api .ArrayLike , ** kwargs : Any ) -> Array :
2798
2788
"""Create a sub-array like `data` filled with the `fill_value` of `data` .
2799
2789
@@ -2823,7 +2813,6 @@ def move(self, source: str, dest: str) -> None:
2823
2813
return self ._sync (self ._async_group .move (source , dest ))
2824
2814
2825
2815
@deprecated ("Use Group.create_array instead." )
2826
- @_deprecate_positional_args
2827
2816
def array (
2828
2817
self ,
2829
2818
name : str ,
0 commit comments