From 1fe600c15c7e988ecde323a5807f11f5703567eb Mon Sep 17 00:00:00 2001 From: Bas van Beek <43369155+BvB93@users.noreply.github.com> Date: Thu, 24 Jun 2021 17:47:52 +0200 Subject: MAINT: Replace `"dtype[Any]"` with `dtype` in the definiton of `npt.ArrayLike` Strings and types that are not subscriptable during runtime can cause issues with runtime Introspection helpers such as `typing.get_type_hints`. While this is very much an upstream issue, the particular case of `npt.ArrayLike` can be quite easily resolved in numpy. --- numpy/typing/_array_like.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/typing/_array_like.py') diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py index 3bdbed8f8..b41accc21 100644 --- a/numpy/typing/_array_like.py +++ b/numpy/typing/_array_like.py @@ -73,7 +73,7 @@ _ArrayLike = Union[ ArrayLike = Union[ _RecursiveSequence, _ArrayLike[ - "dtype[Any]", + dtype, Union[bool, int, float, complex, str, bytes] ], ] -- cgit v1.2.1