Skip to content

Commit 6722343

Browse files
committed
remove isinstance check inside bytescodec
1 parent eee0079 commit 6722343

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/zarr/codecs/bytes.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
from enum import Enum
66
from typing import TYPE_CHECKING
77

8-
import numpy as np
9-
108
from zarr.abc.codec import ArrayBytesCodec
11-
from zarr.core.buffer import Buffer, NDArrayLike, NDBuffer
9+
from zarr.core.buffer import Buffer, NDBuffer
1210
from zarr.core.common import JSON, parse_enum, parse_named_configuration
1311
from zarr.core.dtype.common import HasEndianness
1412

@@ -80,7 +78,7 @@ async def _decode_single(
8078
dtype = chunk_spec.dtype.to_native_dtype()
8179
as_array_like = chunk_bytes.as_array_like()
8280
chunk_array = chunk_spec.prototype.nd_buffer.from_ndarray_like(
83-
as_array_like.view(dtype=dtype)
81+
as_array_like.view(dtype=dtype) # type: ignore[attr-defined]
8482
)
8583

8684
# ensure correct chunk shape

0 commit comments

Comments
 (0)