Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.isfinite

Contents

jax.numpy.isfinite#

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

Return a boolean array indicating whether each element of input is finite.

JAX implementation ofnumpy.isfinite.

Parameters:

x (ArrayLike) – input array or scalar.

Returns:

A boolean array of same shape asx containingTrue wherex isnotinf,-inf, orNaN, andFalse otherwise.

Return type:

Array

See also

  • jax.numpy.isinf(): Returns a boolean array indicating whether eachelement of input is either positive or negative infinity.

  • jax.numpy.isposinf(): Returns a boolean array indicating whether eachelement of input is positive infinity.

  • jax.numpy.isneginf(): Returns a boolean array indicating whether eachelement of input is negative infinity.

  • jax.numpy.isnan(): Returns a boolean array indicating whether eachelement 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)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp