|
98 | 98 | ArrayV3MetadataDict, |
99 | 99 | T_ArrayMetadata, |
100 | 100 | ) |
101 | | -from zarr.core.metadata.dtype import BaseDataType |
| 101 | +from zarr.core.metadata.dtype import DtypeBase |
102 | 102 | from zarr.core.metadata.v2 import ( |
103 | 103 | _default_compressor, |
104 | 104 | _default_filters, |
@@ -679,7 +679,7 @@ def _create_metadata_v3( |
679 | 679 | """ |
680 | 680 |
|
681 | 681 | shape = parse_shapelike(shape) |
682 | | - codecs = list(codecs) if codecs is not None else _get_default_codecs(np.dtype(dtype)) |
| 682 | + codecs = list(codecs) if codecs is not None else _get_default_codecs(dtype) |
683 | 683 | chunk_key_encoding_parsed: ChunkKeyEncodingLike |
684 | 684 | if chunk_key_encoding is None: |
685 | 685 | chunk_key_encoding_parsed = {"name": "default", "separator": "/"} |
@@ -1684,7 +1684,7 @@ async def info_complete(self) -> Any: |
1684 | 1684 | def _info( |
1685 | 1685 | self, count_chunks_initialized: int | None = None, count_bytes_stored: int | None = None |
1686 | 1686 | ) -> Any: |
1687 | | - _data_type: np.dtype[Any] | BaseDataType |
| 1687 | + _data_type: np.dtype[Any] | DtypeBase |
1688 | 1688 | if isinstance(self.metadata, ArrayV2Metadata): |
1689 | 1689 | _data_type = self.metadata.dtype |
1690 | 1690 | else: |
@@ -4207,9 +4207,9 @@ def _get_default_chunk_encoding_v3( |
4207 | 4207 | """ |
4208 | 4208 | dtype = get_data_type_from_numpy(np_dtype) |
4209 | 4209 |
|
4210 | | - default_filters = zarr_config.get("array.v3_default_filters").get(dtype.type) |
4211 | | - default_serializer = zarr_config.get("array.v3_default_serializer").get(dtype.type) |
4212 | | - default_compressors = zarr_config.get("array.v3_default_compressors").get(dtype.type) |
| 4210 | + default_filters = zarr_config.get("array.v3_default_filters").get(dtype.kind) |
| 4211 | + default_serializer = zarr_config.get("array.v3_default_serializer").get(dtype.kind) |
| 4212 | + default_compressors = zarr_config.get("array.v3_default_compressors").get(dtype.kind) |
4213 | 4213 |
|
4214 | 4214 | filters = tuple(_parse_array_array_codec(codec_dict) for codec_dict in default_filters) |
4215 | 4215 | serializer = _parse_array_bytes_codec(default_serializer) |
|
0 commit comments