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

Question about Array #280

Closed
carlosal1015 opened this issue Dec 23, 2024 · 2 comments
Closed

Question about Array #280

carlosal1015 opened this issue Dec 23, 2024 · 2 comments
Labels
question User queries

Comments

@carlosal1015
Copy link

Hi, many thanks for nice package. I have a question.

Suppose that python-numpy is installed, but not python-jax. See https://aur.archlinux.org/packages/python-jaxtyping#comment-908221

import numpy as np
from jaxtyping import Array, Float

I see that

  • Array point to Array class in /usr/lib/python3.13/site-packages/jax/_src/basearray.py.
  • Float point to Annotated function in /usr/lib/python3.13/typing.py.

Therefore, is not possible use Array for typing numpy arrays. Is this intended behavior?

@johannahaffner
Copy link

Yes, it is the intended behaviour, documented here.
Instead of the JAX-specific Array, you can also use np.ndarray, torch.Tensor and tf.Tensor.

@patrick-kidger patrick-kidger added the question User queries label Dec 23, 2024
@carlosal1015
Copy link
Author

Many thanks 😄

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

No branches or pull requests

3 participants