Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.isinf

Contents

jax.numpy.isinf#

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

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

JAX implementation ofnumpy.isinf.

Parameters:

x (ArrayLike) – input array or scalar.

Returns:

A boolean array of same shape asx containingTrue wherex isinf or-inf, andFalse otherwise.

Return type:

Array

See also

  • 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.isfinite(): Returns a boolean array indicating whether eachelement of input is finite.

  • jax.numpy.isnan(): Returns a boolean array indicating whether eachelement of input is not a number (NaN).

Examples

>>>jnp.isinf(jnp.inf)Array(True, dtype=bool)>>>x=jnp.array([2+3j,-jnp.inf,6,jnp.inf,jnp.nan])>>>jnp.isinf(x)Array([False,  True, False,  True, False], dtype=bool)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp