-
Notifications
You must be signed in to change notification settings - Fork 29
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
Deprecate creation of dtypes via np.dtype('typename')
#93
Comments
For what it's worth, if the deprecation I proposed does go through, the string type names will still work for builtin numpy dtypes, just not ones added via the |
Thanks for the clarification – understood. But in tensorflow and jax, we have 4+ years of legacy code written in a context where |
As @hawkinsp pointed out in the NumPy repo, adding these dtypes to NumPy itself would also fix the problem, since hopefully jax users don't care if the dtype is defined inside NumPy or in an extension. It would probably need a NEP and a reference implementation but I think the existing downstream usage by jax proves out a real need and if we can inherit names that are already used by jax that also avoids some bikeshedding. I would hope it should be relatively straightforward to write these dtypes using the new dtype API since they are non-parametric and have a straightforward binary layout and cast definitions. The devil is in the details, of course... I proposed adding a new dtype to NumPy written using the experimental dtype API in NEP 55. If that NEP is accepted and the code is upstreamed it should be much clearer how to integrate dtypes written outside of NumPy into NumPy itself. Of course all of this is just my opinion so far, I'll wait to weigh in more until others from NumPy have weighed in about the |
For what it's worth, we created The |
See numpy/numpy#24699
I suspect this is also going to break a lot of JAX code as well...
The text was updated successfully, but these errors were encountered: