isinf

Contents

isinf#

class brainunit.math.isinf(a)#

Test element-wise for positive or negative infinity.

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