Skip to content

Clarifying whether jax.jit only works for Jax array and not numpy arrays #22864

Closed Answered by jakevdp
prrathi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi - thanks for the question! Functions wrapped in jax.jit only operate on JAX arrays, not on NumPy arrays. But for historical reasons, JIT-compiled functions accept NumPy arrays as inputs, and silently convert them to JAX arrays.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jakevdp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants