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

Do not have explicit dtype in hints #211

Closed
juanitorduz opened this issue Dec 26, 2024 · 3 comments
Closed

Do not have explicit dtype in hints #211

juanitorduz opened this issue Dec 26, 2024 · 3 comments

Comments

@juanitorduz
Copy link
Contributor

When trying to fix #210 I am seeing a lot of casting code which can be distracting and really not important. What if we use something like

https://numpy.org/doc/stable/reference/typing.html#number-precision

or even

from jaxtyping import Array

from https://docs.kidger.site/jaxtyping/ (despite the name of the package we can just use it for NumPy)

JAX has a nice array convention, but I do not see this in NumPy (ArrayLike, yes but not purely Array), see https://jax.readthedocs.io/en/latest/jep/12049-type-annotations.html

Thoughts?

@aloctavodia
Copy link
Member

not sure which one is a better solution. But I agree with your diagnostics.

@juanitorduz
Copy link
Contributor Author

Ok! Let me do some research these days to have better data and options 🤔

@juanitorduz
Copy link
Contributor Author

Actually, in dd6a6e8 I just removed the reference to the specific float precision (np.float64) and things look cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants