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
dtype is not defined when using ArrayLike with get_type_hints #19327
Comments
So this is admittedly a rather annoying issue that highlights some serious limitations of
numpy/numpy/typing/_array_like.py Lines 73 to 79 in 9b19257
In any case, I've just created #19328 which will resolve the issue once it's backported for 1.21.1. EDIT: xref python/typing#819 |
@BvB93 thank you!! 🙏 |
This reverts commit b667ce4. numpy 1.21.1 is available, incorporating the fix: numpy/numpy#19327 Closes #2613
This reverts commit b667ce4. numpy 1.21.1 is available, incorporating the fix: numpy/numpy#19327 Closes InsightSoftwareConsortium#2613
dtype
is not defined when usingnumpy.typing.ArrayLike
withtyping.get_type_hints
andnumpy==1.21.0
.Reproducing code example:
Error message:
NumPy/Python version information:
This occurs with numpy 1.21.0. It did not occur with 1.20.3 or previous versions.
The text was updated successfully, but these errors were encountered: