Return a boolean array indicating whether each element of input is finite.
JAX implementation of numpy.isfinite
.
x (ArrayLike) – input array or scalar.
A boolean array of same shape as x
containing True
where x
is not inf
, -inf
, or NaN
, and False
otherwise.
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.isneginf()
: Returns a boolean array indicating whether each element of input is negative infinity.
jax.numpy.isnan()
: Returns a boolean array indicating whether each element of input is not a number (NaN
).
Examples
>>> x = jnp.array([-1, 3, jnp.inf, jnp.nan]) >>> jnp.isfinite(x) Array([ True, True, False, False], dtype=bool) >>> jnp.isfinite(3-4j) Array(True, dtype=bool, weak_type=True)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4