A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.greater.html below:

jax.numpy.greater — JAX documentation

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

Return element-wise truth value of x > y.

JAX implementation of numpy.greater.

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

  • y (ArrayLike) – input array or scalar. x and y must either have same shape or be broadcast compatible.

Returns:

An array containing boolean values. True if the elements of x > y, and False otherwise.

Return type:

Array

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)

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