-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve error message for NumPy alias type used as dtype in ArrayNdCtors #6184
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
Comments
Can I get this? |
@abhinavjonnada82 thanks for asking, I think @Luiz6ustav0 has opened a PR for this already in #6243. If you'd like to contribute to Numba there's a |
I'm having a similar issue with
I have tried using the |
I was able to resolve this by removing the type signatures and replacing a float tuple in another (NumPy) function with an int tuple ... not sure why this caused an error to be thrown here, but it seems to be working alright for now. |
@generic-github-user thank you for asking about this. When using from numba import njit
import numpy as np
@njit
def create():
return np.zeros((50, 50), dtype=np.float32)
print(create()) |
Thank you, I've since realized this mistake. The error messages were somewhat difficult to parse at first but it's more clear now. |
Reporting a bug
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).
As per #3993 This
produces:
which provides correct information given what Numba can infer generically, but this is a common issue and so it'd probably be a good idea to provide a specific message.
Here's starter patch to provide a better error message:
with such a patch, this appears:
The text was updated successfully, but these errors were encountered: