warp.from_jax#

warp.from_jax(jax_array, dtype=None)[source]#

Convert a Jax array to a Warp array without copying the data.

Parameters:
  • jax_array (jax.Array) – The Jax array to convert.

  • dtype (optional) – The target data type of the resulting Warp array. Defaults to the Jax array’s data type mapped to a Warp data type.

Returns:

The converted Warp array.

Return type:

warp.array