Skip to content

Commit 9284246

Browse files
committed
fix mypy
1 parent b005620 commit 9284246

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/zarr/core/array.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,12 +2271,7 @@ def __array__(
22712271
raise ValueError(msg)
22722272

22732273
arr = self[...]
2274-
arr_np: NDArrayLike
2275-
2276-
if not hasattr(arr, "astype"):
2277-
arr_np = np.array(arr, dtype=dtype)
2278-
else:
2279-
arr_np = arr
2274+
arr_np: NDArrayLike = np.array(arr, dtype=dtype)
22802275

22812276
if dtype is not None:
22822277
arr_np = arr_np.astype(dtype)
@@ -3330,7 +3325,7 @@ def set_coordinate_selection(
33303325
value = np.array(value).reshape(-1)
33313326

33323327
if not is_scalar(value, self.dtype) and (
3333-
isinstance(value, NDArrayOrScalarLike) and indexer.shape != value.shape
3328+
isinstance(value, NDArrayLike) and indexer.shape != value.shape
33343329
):
33353330
raise ValueError(
33363331
f"Attempting to set a selection of {indexer.sel_shape[0]} "

0 commit comments

Comments
 (0)