We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've grown very interested in obtaining and expanding numpy stubs.
However, when it comes to typed ndarrays, I've come to this issue
def a_function(x: np.ndarray[np.float32]) -> None: print('Foo')
is valid for mypy, however the python3 interpreter fails (logically. Here in interpreter, same for type hints in modules.).
In [4]: np.ndarray[np.float32] --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-d3b20ca13ba6> in <module>() ----> 1 np.ndarray[np.float32] TypeError: 'type' object is not subscriptable
Question is, how to circumvent this problem ? a typing package style protocol requiring arguments dtype, shape, etc... ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've grown very interested in obtaining and expanding numpy stubs.
However, when it comes to typed ndarrays, I've come to this issue
is valid for mypy, however the python3 interpreter fails (logically. Here in interpreter, same for type hints in modules.).
Question is, how to circumvent this problem ? a typing package style protocol requiring arguments dtype, shape, etc... ?
The text was updated successfully, but these errors were encountered: