From 03dc8bfbc809b43b91b4ecb8f481be1ce2644d66 Mon Sep 17 00:00:00 2001 From: Bas van Beek Date: Mon, 24 Jan 2022 17:28:33 +0100 Subject: MAINT: Create the `_ArrayLike` type-alias in `numpy.typing` Represents a subset of `npt.ArrayLike` that can be parametrized w.r.t. `np.generic` --- numpy/lib/function_base.pyi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'numpy/lib/function_base.pyi') diff --git a/numpy/lib/function_base.pyi b/numpy/lib/function_base.pyi index d99672169..bba4c0297 100644 --- a/numpy/lib/function_base.pyi +++ b/numpy/lib/function_base.pyi @@ -18,7 +18,6 @@ else: from numpy import ( vectorize as vectorize, ufunc, - dtype, generic, floating, complexfloating, @@ -38,8 +37,7 @@ from numpy.typing import ( _ShapeLike, _ScalarLike_co, _DTypeLike, - _FiniteNestedSequence, - _SupportsArray, + _ArrayLike, _ArrayLikeInt_co, _ArrayLikeFloat_co, _ArrayLikeComplex_co, @@ -67,7 +65,6 @@ _SCT = TypeVar("_SCT", bound=generic) _ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) _2Tuple = tuple[_T, _T] -_ArrayLike = _FiniteNestedSequence[_SupportsArray[dtype[_SCT]]] class _TrimZerosSequence(Protocol[_T_co]): def __len__(self) -> int: ... -- cgit v1.2.1