15
15
Array ,
16
16
AsyncArray ,
17
17
CompressorLike ,
18
- _get_default_chunk_encoding_v2 ,
19
18
create_array ,
20
19
from_array ,
21
20
get_array_metadata ,
33
32
_warn_order_kwarg ,
34
33
_warn_write_empty_chunks_kwarg ,
35
34
)
36
- from zarr .core .dtype import ZDTypeLike , get_data_type_from_native_dtype , parse_data_type
35
+ from zarr .core .dtype import ZDTypeLike , get_data_type_from_native_dtype
37
36
from zarr .core .group import (
38
37
AsyncGroup ,
39
38
ConsolidatedMetadata ,
48
47
if TYPE_CHECKING :
49
48
from collections .abc import Iterable
50
49
50
+ import numcodecs .abc
51
+
51
52
from zarr .abc .codec import Codec
52
53
from zarr .core .buffer import NDArrayLikeOrScalar
53
54
from zarr .core .chunk_key_encodings import ChunkKeyEncoding
@@ -871,7 +872,7 @@ async def create(
871
872
overwrite : bool = False ,
872
873
path : PathLike | None = None ,
873
874
chunk_store : StoreLike | None = None ,
874
- filters : list [dict [str , JSON ]] | None = None , # TODO: type has changed
875
+ filters : Iterable [dict [str , JSON ] | numcodecs . abc . Codec ] | None = None ,
875
876
cache_metadata : bool | None = None ,
876
877
cache_attrs : bool | None = None ,
877
878
read_only : bool | None = None ,
@@ -1009,13 +1010,6 @@ async def create(
1009
1010
_handle_zarr_version_or_format (zarr_version = zarr_version , zarr_format = zarr_format )
1010
1011
or _default_zarr_format ()
1011
1012
)
1012
- zdtype = parse_data_type (dtype , zarr_format = zarr_format )
1013
- if zarr_format == 2 :
1014
- default_filters , default_compressor = _get_default_chunk_encoding_v2 (zdtype )
1015
- if not filters :
1016
- filters = default_filters # type: ignore[assignment]
1017
- if compressor == "auto" :
1018
- compressor = default_compressor
1019
1013
1020
1014
if synchronizer is not None :
1021
1015
warnings .warn ("synchronizer is not yet implemented" , RuntimeWarning , stacklevel = 2 )
@@ -1029,14 +1023,14 @@ async def create(
1029
1023
warnings .warn ("object_codec is not yet implemented" , RuntimeWarning , stacklevel = 2 )
1030
1024
if read_only is not None :
1031
1025
warnings .warn ("read_only is not yet implemented" , RuntimeWarning , stacklevel = 2 )
1026
+ if meta_array is not None :
1027
+ warnings .warn ("meta_array is not yet implemented" , RuntimeWarning , stacklevel = 2 )
1028
+
1032
1029
if order is not None :
1033
1030
_warn_order_kwarg ()
1034
1031
if write_empty_chunks is not None :
1035
1032
_warn_write_empty_chunks_kwarg ()
1036
1033
1037
- if meta_array is not None :
1038
- warnings .warn ("meta_array is not yet implemented" , RuntimeWarning , stacklevel = 2 )
1039
-
1040
1034
mode = kwargs .pop ("mode" , None )
1041
1035
if mode is None :
1042
1036
mode = "a"
@@ -1067,7 +1061,7 @@ async def create(
1067
1061
store_path ,
1068
1062
shape = shape ,
1069
1063
chunks = chunks ,
1070
- dtype = zdtype ,
1064
+ dtype = dtype ,
1071
1065
compressor = compressor ,
1072
1066
fill_value = fill_value ,
1073
1067
overwrite = overwrite ,
0 commit comments