lcm#
- class brainunit.math.lcm(x1, x2, **kwargs)#
Return the least common multiple of x1 and x2.
- Parameters:
- Returns:
out – Quantity if x1 and x2 are Quantities that have the same unit, else an array.
- Return type:
saiunit.Quantity |
Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> a = jnp.array([4, 6]) * u.second >>> b = jnp.array([6, 8]) * u.second >>> u.math.lcm(a.astype(jnp.int64), b.astype(jnp.int64))