From 5c07541e6380f4bd0f5dee73e20deac21d40c529 Mon Sep 17 00:00:00 2001 From: Bas van Beek Date: Fri, 18 Sep 2020 17:23:15 +0200 Subject: TST: Added new `ndarray`/`generic` typing tests --- numpy/__init__.pyi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'numpy/__init__.pyi') diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index fd7731133..633aa0ca3 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -521,20 +521,20 @@ class _ArrayOrScalarCommon( ) -> _NdArraySubClass: ... @overload def clip( - self: _ArraySelf, + self, min: ArrayLike = ..., max: Optional[ArrayLike] = ..., out: None = ..., **kwargs: Any, - ) -> Union[_ArraySelf, number]: ... + ) -> Union[number, ndarray]: ... @overload def clip( - self: _ArraySelf, + self, min: None = ..., max: ArrayLike = ..., out: None = ..., **kwargs: Any, - ) -> Union[_ArraySelf, number]: ... + ) -> Union[number, ndarray]: ... @overload def clip( self, @@ -1088,6 +1088,9 @@ class void(flexible): def real(self: _ArraySelf) -> _ArraySelf: ... @property def imag(self: _ArraySelf) -> _ArraySelf: ... + def setfield( + self, val: ArrayLike, dtype: DtypeLike, offset: int = ... + ) -> None: ... class character(flexible): ... # type: ignore -- cgit v1.2.1