diff options
| author | Bas van Beek <b.f.van.beek@vu.nl> | 2022-01-24 17:17:35 +0100 |
|---|---|---|
| committer | Bas van Beek <b.f.van.beek@vu.nl> | 2022-01-24 17:29:03 +0100 |
| commit | 5264dc220dc208e533bdbdcafa9f4f06ddb04aab (patch) | |
| tree | 5c3035d8acba53fe3a4efe9600f7a88eceefa055 /numpy/lib/function_base.pyi | |
| parent | 6218e76bc590e9253ed8d4c4b18c74aa81332b15 (diff) | |
| download | numpy-5264dc220dc208e533bdbdcafa9f4f06ddb04aab.tar.gz | |
MAINT: Create the `_DTypeLike` type-alias in `numpy.typing`
Represents a subset of `npt.DTypeLike` that can be parametrized w.r.t. `np.generic`
Diffstat (limited to 'numpy/lib/function_base.pyi')
| -rw-r--r-- | numpy/lib/function_base.pyi | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/numpy/lib/function_base.pyi b/numpy/lib/function_base.pyi index 6e2f886cf..d99672169 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, @@ -38,7 +37,7 @@ from numpy.typing import ( DTypeLike, _ShapeLike, _ScalarLike_co, - _SupportsDType, + _DTypeLike, _FiniteNestedSequence, _SupportsArray, _ArrayLikeInt_co, @@ -69,11 +68,6 @@ _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: ... |
