@@ -410,12 +410,12 @@ async def from_store(
410410 store : StoreLike ,
411411 * ,
412412 attributes : dict [str , Any ] | None = None ,
413- exists_ok : bool = False ,
413+ overwrite : bool = False ,
414414 zarr_format : ZarrFormat = 3 ,
415415 ) -> AsyncGroup :
416416 store_path = await make_store_path (store )
417417
418- if exists_ok :
418+ if overwrite :
419419 if store_path .store .supports_deletes :
420420 await store_path .delete_dir ()
421421 else :
@@ -629,7 +629,7 @@ async def setitem(self, key: str, value: Any) -> None:
629629 """
630630 path = self .store_path / key
631631 await async_api .save_array (
632- store = path , arr = value , zarr_format = self .metadata .zarr_format , exists_ok = True
632+ store = path , arr = value , zarr_format = self .metadata .zarr_format , overwrite = True
633633 )
634634
635635 async def getitem (
@@ -919,7 +919,7 @@ async def create_group(
919919 self ,
920920 name : str ,
921921 * ,
922- exists_ok : bool = False ,
922+ overwrite : bool = False ,
923923 attributes : dict [str , Any ] | None = None ,
924924 ) -> AsyncGroup :
925925 """Create a sub-group.
@@ -928,7 +928,7 @@ async def create_group(
928928 ----------
929929 name : str
930930 Group name.
931- exists_ok : bool, optional
931+ overwrite : bool, optional
932932 If True, do not raise an error if the group already exists.
933933 attributes : dict, optional
934934 Group attributes.
@@ -941,7 +941,7 @@ async def create_group(
941941 return await type (self ).from_store (
942942 self .store_path / name ,
943943 attributes = attributes ,
944- exists_ok = exists_ok ,
944+ overwrite = overwrite ,
945945 zarr_format = self .metadata .zarr_format ,
946946 )
947947
@@ -960,8 +960,8 @@ async def require_group(self, name: str, overwrite: bool = False) -> AsyncGroup:
960960 g : AsyncGroup
961961 """
962962 if overwrite :
963- # TODO: check that exists_ok =True errors if an array exists where the group is being created
964- grp = await self .create_group (name , exists_ok = True )
963+ # TODO: check that overwrite =True errors if an array exists where the group is being created
964+ grp = await self .create_group (name , overwrite = True )
965965 else :
966966 try :
967967 item : (
@@ -1018,7 +1018,7 @@ async def create_array(
10181018 filters : list [dict [str , JSON ]] | None = None ,
10191019 compressor : dict [str , JSON ] | None = None ,
10201020 # runtime
1021- exists_ok : bool = False ,
1021+ overwrite : bool = False ,
10221022 data : npt .ArrayLike | None = None ,
10231023 ) -> AsyncArray [ArrayV2Metadata ] | AsyncArray [ArrayV3Metadata ]:
10241024 """
@@ -1052,7 +1052,7 @@ async def create_array(
10521052 Filters for the array.
10531053 compressor : dict[str, JSON] | None = None
10541054 The compressor for the array.
1055- exists_ok : bool = False
1055+ overwrite : bool = False
10561056 If True, a pre-existing array or group at the path of this array will
10571057 be overwritten. If False, the presence of a pre-existing array or group is
10581058 an error.
@@ -1077,7 +1077,7 @@ async def create_array(
10771077 order = order ,
10781078 filters = filters ,
10791079 compressor = compressor ,
1080- exists_ok = exists_ok ,
1080+ overwrite = overwrite ,
10811081 zarr_format = self .metadata .zarr_format ,
10821082 data = data ,
10831083 )
@@ -1651,7 +1651,7 @@ def from_store(
16511651 * ,
16521652 attributes : dict [str , Any ] | None = None ,
16531653 zarr_format : ZarrFormat = 3 ,
1654- exists_ok : bool = False ,
1654+ overwrite : bool = False ,
16551655 ) -> Group :
16561656 """Instantiate a group from an initialized store.
16571657
@@ -1663,7 +1663,7 @@ def from_store(
16631663 A dictionary of JSON-serializable values with user-defined attributes.
16641664 zarr_format : {2, 3}, optional
16651665 Zarr storage format version.
1666- exists_ok : bool, optional
1666+ overwrite : bool, optional
16671667 If True, do not raise an error if the group already exists.
16681668
16691669 Returns
@@ -1680,7 +1680,7 @@ def from_store(
16801680 AsyncGroup .from_store (
16811681 store ,
16821682 attributes = attributes ,
1683- exists_ok = exists_ok ,
1683+ overwrite = overwrite ,
16841684 zarr_format = zarr_format ,
16851685 ),
16861686 )
@@ -2217,7 +2217,7 @@ def create_array(
22172217 filters : list [dict [str , JSON ]] | None = None ,
22182218 compressor : dict [str , JSON ] | None = None ,
22192219 # runtime
2220- exists_ok : bool = False ,
2220+ overwrite : bool = False ,
22212221 data : npt .ArrayLike | None = None ,
22222222 ) -> Array :
22232223 """Create a zarr array within this AsyncGroup.
@@ -2251,7 +2251,7 @@ def create_array(
22512251 Filters for the array.
22522252 compressor : dict[str, JSON] | None = None
22532253 The compressor for the array.
2254- exists_ok : bool = False
2254+ overwrite : bool = False
22552255 If True, a pre-existing array or group at the path of this array will
22562256 be overwritten. If False, the presence of a pre-existing array or group is
22572257 an error.
@@ -2280,7 +2280,7 @@ def create_array(
22802280 order = order ,
22812281 filters = filters ,
22822282 compressor = compressor ,
2283- exists_ok = exists_ok ,
2283+ overwrite = overwrite ,
22842284 data = data ,
22852285 )
22862286 )
@@ -2558,7 +2558,7 @@ def array(
25582558 filters : list [dict [str , JSON ]] | None = None ,
25592559 compressor : dict [str , JSON ] | None = None ,
25602560 # runtime
2561- exists_ok : bool = False ,
2561+ overwrite : bool = False ,
25622562 data : npt .ArrayLike | None = None ,
25632563 ) -> Array :
25642564 """Create a zarr array within this AsyncGroup.
@@ -2592,7 +2592,7 @@ def array(
25922592 Filters for the array.
25932593 compressor : dict[str, JSON] | None = None
25942594 The compressor for the array.
2595- exists_ok : bool = False
2595+ overwrite : bool = False
25962596 If True, a pre-existing array or group at the path of this array will
25972597 be overwritten. If False, the presence of a pre-existing array or group is
25982598 an error.
@@ -2622,7 +2622,7 @@ def array(
26222622 order = order ,
26232623 filters = filters ,
26242624 compressor = compressor ,
2625- exists_ok = exists_ok ,
2625+ overwrite = overwrite ,
26262626 data = data ,
26272627 )
26282628 )
0 commit comments