Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.greater

Contents

jax.numpy.greater#

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

Return element-wise truth value ofx>y.

JAX implementation ofnumpy.greater.

Parameters:
  • x (ArrayLike) – input array or scalar.

  • y (ArrayLike) – input array or scalar.x andy must either have same shape or bebroadcast compatible.

Returns:

An array containing boolean values.True if the elements ofx>y,andFalse otherwise.

Return type:

Array

See also

Examples

Scalar inputs:

>>>jnp.greater(5,2)Array(True, dtype=bool, weak_type=True)

Inputs with same shape:

>>>x=jnp.array([5,9,-2])>>>y=jnp.array([4,-1,6])>>>jnp.greater(x,y)Array([ True,  True, False], dtype=bool)

Inputs with broadcast compatibility:

>>>x1=jnp.array([[5,-6,7],...[-2,5,9]])>>>y1=jnp.array([-4,3,10])>>>jnp.greater(x1,y1)Array([[ True, False, False],       [ True,  True, False]], dtype=bool)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp