jax.numpy.isinf(x, /)[source]#

Test element-wise for positive or negative infinity.

LAX-backend implementation of numpy.isinf().

Original docstring below.

Returns a boolean array of the same shape as x, True where x == +/-inf, otherwise False.


x (array_like) – Input values


y – True where x is positive or negative infinity, false otherwise. This is a scalar if x is a scalar.

Return type

bool (scalar) or boolean ndarray