jax.numpy.isposinf — JAX documentation (original) (raw)

jax.numpy.isposinf#

jax.numpy.isposinf(x, /, out=None)[source]#

Return boolean array indicating whether each element of input is positive infinite.

JAX implementation of numpy.isposinf.

Parameters:

x – input array or scalar. complex dtype are not supported.

Returns:

A boolean array of same shape as x containing True where x isinf, and False otherwise.

See also

Examples

jnp.isposinf(5) Array(False, dtype=bool) x = jnp.array([-jnp.inf, 5, jnp.inf, jnp.nan, 1]) jnp.isposinf(x) Array([False, False, True, False, False], dtype=bool)