diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-06-24 17:47:52 +0200 |
---|---|---|
committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-06-24 17:49:40 +0200 |
commit | 1fe600c15c7e988ecde323a5807f11f5703567eb (patch) | |
tree | 32bd61e455b5689f533a9c2a133d99653451f5b3 /numpy/typing/_array_like.py | |
parent | 9b192570661d55575606f2a77a7bc9e280120f5c (diff) | |
download | numpy-1fe600c15c7e988ecde323a5807f11f5703567eb.tar.gz |
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.
Diffstat (limited to 'numpy/typing/_array_like.py')
-rw-r--r-- | numpy/typing/_array_like.py | 2 |
1 files changed, 1 insertions, 1 deletions
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] ], ] |