Skip to content
Discussion options

You must be logged in to vote

Using jnp.asarray with a dtype argument is fine; you can also use new_jnp_arr = old_jnp_arr.astype(jnp.int32). Both approaches end up being implemented in terms of the same lower-level jax.lax.convert_element_type function.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hawkinsp
Comment options

@backpropper
Comment options

Answer selected by backpropper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants