(x)
Puts ``x`` in CPU memory in JAX.
Puts ``x`` in CPU memory in JAX.
Puts x in CPU memory in JAX .
def on_cpu(x):
  """Puts ``x`` in CPU memory in JAX."""
  if fastmath.is_backend(fastmath.Backend.JAX):
    return jax.device_put(x, jax.devices('cpu')[0])
  else:
    return x
def on_cpu ( x ) : if fastmath . is_backend ( fastmath . Backend . JAX ) : return jax . device_put ( x , jax . devices ( 'cpu' ) [ 0 ] ) else : return x