jax.Array.astype
Contents
jax.Array.astype#
- abstractArray.astype(dtype,copy=False,device=None)[source]#
Copy the array and cast to a specified dtype.
This is implemented via
jax.lax.convert_element_type(), which mayhave slightly different behavior thannumpy.ndarray.astype()insome cases. In particular, the details of float-to-int and int-to-floatcasts are implementation dependent.
Contents
