isreal#
- class saiunit.math.isreal(a)#
Test element-wise whether each element is real (has zero imaginary part).
- Parameters:
a (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – Input array.- Returns:
out – Boolean array of the same shape as a.
- Return type:
Array
Examples
>>> import jax.numpy as jnp >>> import saiunit.math as sumath >>> sumath.isreal(jnp.array([1.0, 2.0 + 0j, 3.0 + 1j])) Array([ True, True, False], dtype=bool)