astype#
- class brainunit.math.astype(x, dtype)[source]#
Copy of the array, cast to a specified type.
- Parameters:
- Returns:
out – A copy of the array, cast to a specified type.
- Return type:
Array| saiunit.Quantity
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> a = [1, 2, 3] * u.second >>> u.math.astype(a, jnp.float32)