diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2022-01-24 13:06:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 13:06:38 -0700 |
commit | 4eb53425ecdad412411d6d174064405f511494eb (patch) | |
tree | d627007958fd05fcf63e69afee6e67cd89166ed6 /numpy/lib/function_base.pyi | |
parent | 986a8797b9bf7ccb499861bb46ec8ce13fb720ec (diff) | |
parent | 734c4fdb56d8b954bd852eb3133eb9f36277137d (diff) | |
download | numpy-4eb53425ecdad412411d6d174064405f511494eb.tar.gz |
Merge pull request #20887 from BvB93/aliases
TYP,MAINT: Add aliases for commonly used unions
Diffstat (limited to 'numpy/lib/function_base.pyi')
-rw-r--r-- | numpy/lib/function_base.pyi | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/numpy/lib/function_base.pyi b/numpy/lib/function_base.pyi index 3b40d3f1c..e0b0c59ee 100644 --- a/numpy/lib/function_base.pyi +++ b/numpy/lib/function_base.pyi @@ -2,7 +2,6 @@ import sys from collections.abc import Sequence, Iterator, Callable, Iterable from typing import ( Literal as L, - Union, Any, TypeVar, overload, @@ -19,7 +18,6 @@ else: from numpy import ( vectorize as vectorize, ufunc, - dtype, generic, floating, complexfloating, @@ -38,9 +36,8 @@ from numpy.typing import ( DTypeLike, _ShapeLike, _ScalarLike_co, - _SupportsDType, - _FiniteNestedSequence, - _SupportsArray, + _DTypeLike, + _ArrayLike, _ArrayLikeInt_co, _ArrayLikeFloat_co, _ArrayLikeComplex_co, @@ -68,12 +65,6 @@ _SCT = TypeVar("_SCT", bound=generic) _ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) _2Tuple = tuple[_T, _T] -_ArrayLike = _FiniteNestedSequence[_SupportsArray[dtype[_SCT]]] -_DTypeLike = Union[ - dtype[_SCT], - type[_SCT], - _SupportsDType[dtype[_SCT]], -] class _TrimZerosSequence(Protocol[_T_co]): def __len__(self) -> int: ... |