From 691726475716c573863de051f17d3ed47500ad24 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 23 Feb 2021 16:17:22 +0000 Subject: added type annotations to eye --- numpy/__init__.pyi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'numpy') diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 1c52c7285..7eebe3a87 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -408,7 +408,15 @@ dstack: Any ediff1d: Any expand_dims: Any extract: Any -eye: Any +def eye( + N: int, + M: int = ..., + k: int = ..., + dtype: DTypeLike = ..., + order: str = ..., + *, + like: ArrayLike = ... +) -> ndarray: ... fill_diagonal: Any finfo: Any flip: Any -- cgit v1.2.1 From 1f972db7df7443c2dcff50eb6a110f297f215fb4 Mon Sep 17 00:00:00 2001 From: Matt-Ord <55235095+Matt-Ord@users.noreply.github.com> Date: Tue, 23 Feb 2021 16:54:28 +0000 Subject: Apply suggestions from code review Fixed annotations of eye() Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com> --- numpy/__init__.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'numpy') diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 7eebe3a87..148a63583 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -410,13 +410,13 @@ expand_dims: Any extract: Any def eye( N: int, - M: int = ..., + M: Optional[int] = ..., k: int = ..., dtype: DTypeLike = ..., - order: str = ..., + order: _OrderCF = ..., *, - like: ArrayLike = ... -) -> ndarray: ... + like: Optional[ArrayLike] = ... +) -> ndarray[Any, Any]: ... fill_diagonal: Any finfo: Any flip: Any -- cgit v1.2.1