jax.numpy.isneginf#
- jax.numpy.isneginf(x, /, out=None)[source]#
Return boolean array indicating whether each element of input is negative infinite.
JAX implementation of
numpy.isneginf.- Parameters:
x – input array or scalar.
complexdtype are not supported.- Returns:
A boolean array of same shape as
xcontainingTruewherexis-inf, andFalseotherwise.
See also
jax.numpy.isinf(): Returns a boolean array indicating whether each element of input is either positive or negative infinity.jax.numpy.isposinf(): Returns a boolean array indicating whether each element of input is positive infinity.jax.numpy.isfinite(): Returns a boolean array indicating whether each element of input is finite.jax.numpy.isnan(): Returns a boolean array indicating whether each element of input is not a number (NaN).
Examples
>>> jnp.isneginf(jnp.inf) Array(False, dtype=bool) >>> x = jnp.array([-jnp.inf, 5, jnp.inf, jnp.nan, 1]) >>> jnp.isneginf(x) Array([ True, False, False, False, False], dtype=bool)