Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.isnan

Contents

jax.numpy.isnan#

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

Returns a boolean array indicating whether each element of input isNaN.

JAX implementation ofnumpy.isnan.

Parameters:

x (ArrayLike) – input array or scalar.

Returns:

A boolean array of same shape asx containingTrue wherex isnot a number (i.e.NaN) andFalse otherwise.

Return type:

Array

See also

  • jax.numpy.isfinite(): Returns a boolean array indicating whether eachelement of input is finite.

  • 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.

Examples

>>>jnp.isnan(6)Array(False, dtype=bool, weak_type=True)>>>x=jnp.array([2,1+4j,jnp.inf,jnp.nan])>>>jnp.isnan(x)Array([False, False, False,  True], dtype=bool)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp