jax.numpy.isinf

Warning

This page was created from a pull request (#9655).

jax.numpy.isinf¶

jax.numpy.isinf(x)[source]¶

Test element-wise for positive or negative infinity.

LAX-backend implementation of isinf().

Original docstring below.

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

Parameters

x (array_like) – Input values

Returns

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