Skip to content

Commit 9cd5c51

Browse files
committed
start working on JSON serialization
1 parent 5000dcb commit 9cd5c51

File tree

5 files changed

+343
-247
lines changed

5 files changed

+343
-247
lines changed

src/zarr/core/_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from zarr.abc.codec import ArrayArrayCodec, ArrayBytesCodec, BytesBytesCodec
99
from zarr.core.common import ZarrFormat
10-
from zarr.core.metadata.dtype import DtypeBase
10+
from zarr.core.metadata.dtype import DTypeBase
1111

1212
# from zarr.core.metadata.v3 import DataType
1313

@@ -80,7 +80,7 @@ class ArrayInfo:
8080

8181
_type: Literal["Array"] = "Array"
8282
_zarr_format: ZarrFormat
83-
_data_type: np.dtype[Any] | DtypeBase
83+
_data_type: np.dtype[Any] | DTypeBase
8484
_shape: tuple[int, ...]
8585
_shard_shape: tuple[int, ...] | None = None
8686
_chunk_shape: tuple[int, ...] | None = None

src/zarr/core/array.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
ArrayV3MetadataDict,
9999
T_ArrayMetadata,
100100
)
101-
from zarr.core.metadata.dtype import DtypeBase
101+
from zarr.core.metadata.dtype import DTypeBase
102102
from zarr.core.metadata.v2 import (
103103
_default_compressor,
104104
_default_filters,
@@ -1684,7 +1684,7 @@ async def info_complete(self) -> Any:
16841684
def _info(
16851685
self, count_chunks_initialized: int | None = None, count_bytes_stored: int | None = None
16861686
) -> Any:
1687-
_data_type: np.dtype[Any] | DtypeBase
1687+
_data_type: np.dtype[Any] | DTypeBase
16881688
if isinstance(self.metadata, ArrayV2Metadata):
16891689
_data_type = self.metadata.dtype
16901690
else:
@@ -3909,7 +3909,7 @@ async def init_array(
39093909

39103910
from zarr.codecs.sharding import ShardingCodec, ShardingCodecIndexLocation
39113911

3912-
dtype_parsed = parse_dtype(dtype, zarr_format=zarr_format)
3912+
dtype_parsed = parse_dtype(dtype)
39133913
shape_parsed = parse_shapelike(shape)
39143914
chunk_key_encoding_parsed = _parse_chunk_key_encoding(
39153915
chunk_key_encoding, zarr_format=zarr_format

0 commit comments

Comments
 (0)