Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Replace "dtype[Any]" with dtype in the definiton of npt.ArrayLike #19330

Merged
merged 3 commits into from Jun 24, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jun 24, 2021

Backport of #19328.
Xref #19327.

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 itself.

…rrayLike`

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.
…h runtime Introspection helpers

* `typing.get_type_hints`
* `typing.get_args`
* `typing.get_origin`
@charris
Copy link
Member

charris commented Jun 24, 2021

Looks like a bit more backport is needed.

@charris charris merged commit 0e0d490 into numpy:maintenance/1.21.x Jun 24, 2021
@charris
Copy link
Member

charris commented Jun 24, 2021

Thanks Bas.

@BvB93 BvB93 deleted the runtime branch June 24, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants