summaryrefslogtreecommitdiff
path: root/numpy/core/function_base.pyi
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-06-14 14:07:18 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-06-14 14:07:18 -0600
commit8c78b84968e580f24b3705378fb35705a434cdf1 (patch)
treec9f82beeb5a2c3f0301f7984d4b6d19539c35d23 /numpy/core/function_base.pyi
parent8bf3a4618f1de951c7a4ccdb8bc3e36825a1b744 (diff)
parent75f852edf94a7293e7982ad516bee314d7187c2d (diff)
downloadnumpy-8c78b84968e580f24b3705378fb35705a434cdf1.tar.gz
Merge branch 'main' into matrix_rank-doc-fix
Diffstat (limited to 'numpy/core/function_base.pyi')
-rw-r--r--numpy/core/function_base.pyi15
1 files changed, 7 insertions, 8 deletions
diff --git a/numpy/core/function_base.pyi b/numpy/core/function_base.pyi
index 1490bed4a..b5d6ca6ab 100644
--- a/numpy/core/function_base.pyi
+++ b/numpy/core/function_base.pyi
@@ -1,21 +1,18 @@
import sys
from typing import overload, Tuple, Union, Sequence, Any
-from numpy import ndarray, inexact
-from numpy.typing import ArrayLike, DTypeLike, _SupportsArray, _NumberLike
+from numpy import ndarray
+from numpy.typing import ArrayLike, DTypeLike, _SupportsArray, _NumberLike_co
if sys.version_info >= (3, 8):
from typing import SupportsIndex, Literal
else:
- from typing_extensions import Literal, Protocol
-
- class SupportsIndex(Protocol):
- def __index__(self) -> int: ...
+ from typing_extensions import SupportsIndex, Literal
# TODO: wait for support for recursive types
_ArrayLikeNested = Sequence[Sequence[Any]]
_ArrayLikeNumber = Union[
- _NumberLike, Sequence[_NumberLike], ndarray, _SupportsArray, _ArrayLikeNested
+ _NumberLike_co, Sequence[_NumberLike_co], ndarray, _SupportsArray, _ArrayLikeNested
]
@overload
def linspace(
@@ -36,7 +33,8 @@ def linspace(
retstep: Literal[True] = ...,
dtype: DTypeLike = ...,
axis: SupportsIndex = ...,
-) -> Tuple[ndarray, inexact]: ...
+) -> Tuple[ndarray, Any]: ...
+
def logspace(
start: _ArrayLikeNumber,
stop: _ArrayLikeNumber,
@@ -46,6 +44,7 @@ def logspace(
dtype: DTypeLike = ...,
axis: SupportsIndex = ...,
) -> ndarray: ...
+
def geomspace(
start: _ArrayLikeNumber,
stop: _ArrayLikeNumber,