8000 TYP: Ensure that `astype` only allows ndarrays and not arbitrary arra… · BvB93/numpy@ade8da8 · GitHub
[go: up one dir, main page]

Skip to content

Commit ade8da8

Browse files
committed
TYP: Ensure that astype only allows ndarrays and not arbitrary array-likes
xref numpy#25079
1 parent 166c706 commit ade8da8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/_core/numeric.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,13 +694,13 @@ def array_equiv(a1: ArrayLike, a2: ArrayLike) -> bool: ...
694694

695695
@overload
696696
def astype(
697-
x: ArrayLike,
697+
x: NDArray[Any],
698698
dtype: _DTypeLike[_SCT],
699699
copy: bool = ...,
700700
) -> NDArray[_SCT]: ...
701701
@overload
702702
def astype(
703-
x: ArrayLike,
703+
x: NDArray[Any],
704704
dtype: DTypeLike,
705705
copy: bool = ...,
706706
) -> NDArray[Any]: ...

0 commit comments

Comments
 (0)
0