Skip to content

Commit f6ae2f8

Browse files
committed
fix mypy
1 parent 03e2500 commit f6ae2f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/zarr/api/asynchronous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ async def array(
554554

555555
# setup dtype
556556
kw_dtype = kwargs.get("dtype")
557-
if kw_dtype is None:
557+
if kw_dtype is None and hasattr(data, "dtype"):
558558
kwargs["dtype"] = data.dtype
559559
else:
560560
kwargs["dtype"] = kw_dtype

src/zarr/core/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3850,7 +3850,7 @@ async def from_array(
38503850
filters = data.filters
38513851
if compressors is None:
38523852
compressors = data.compressors
3853-
if serializer is None:
3853+
if serializer is "auto":
38543854
serializer = data.serializer
38553855
if fill_value is None:
38563856
fill_value = data.fill_value

0 commit comments

Comments
 (0)