|
29 | 29 | _default_zarr_format, |
30 | 30 | _warn_order_kwarg, |
31 | 31 | _warn_write_empty_chunks_kwarg, |
32 | | - parse_dtype, |
33 | 32 | ) |
34 | 33 | from zarr.core.group import ( |
35 | 34 | AsyncGroup, |
|
38 | 37 | create_hierarchy, |
39 | 38 | ) |
40 | 39 | from zarr.core.metadata import ArrayMetadataDict, ArrayV2Metadata, ArrayV3Metadata |
41 | | -from zarr.core.metadata.v2 import _default_compressor, _default_filters |
42 | 40 | from zarr.errors import GroupNotFoundError, NodeTypeValidationError |
43 | 41 | from zarr.storage._common import make_store_path |
44 | 42 |
|
45 | 43 | if TYPE_CHECKING: |
46 | 44 | from collections.abc import Iterable |
47 | 45 |
|
| 46 | + import numcodecs.abc |
| 47 | + |
48 | 48 | from zarr.abc.codec import Codec |
49 | 49 | from zarr.core.buffer import NDArrayLikeOrScalar |
50 | 50 | from zarr.core.chunk_key_encodings import ChunkKeyEncoding |
@@ -852,7 +852,7 @@ async def create( |
852 | 852 | overwrite: bool = False, |
853 | 853 | path: PathLike | None = None, |
854 | 854 | chunk_store: StoreLike | None = None, |
855 | | - filters: list[dict[str, JSON]] | None = None, # TODO: type has changed |
| 855 | + filters: Iterable[dict[str, JSON] | numcodecs.abc.Codec] | None = None, |
856 | 856 | cache_metadata: bool | None = None, |
857 | 857 | cache_attrs: bool | None = None, |
858 | 858 | read_only: bool | None = None, |
@@ -991,11 +991,6 @@ async def create( |
991 | 991 | or _default_zarr_format() |
992 | 992 | ) |
993 | 993 |
|
994 | | - if zarr_format == 2: |
995 | | - dtype = parse_dtype(dtype, zarr_format) |
996 | | - if not filters: |
997 | | - filters = _default_filters(dtype) |
998 | | - |
999 | 994 | if synchronizer is not None: |
1000 | 995 | warnings.warn("synchronizer is not yet implemented", RuntimeWarning, stacklevel=2) |
1001 | 996 | if chunk_store is not None: |
|
0 commit comments