isnan

Contents

isnan#

class brainunit.math.isnan(a)#

Test element-wise for NaN.

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.isnan(jnp.array([1.0, jnp.nan, 3.0]))
Array([False,  True, False], dtype=bool)