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.less.html below:

jax.numpy.less — JAX documentation

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

Return element-wise truth value of x < y.

JAX implementation of numpy.less.

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.less(3, 7)
Array(True, dtype=bool, weak_type=True)

Inputs with same shape:

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

Inputs with broadcast compatibility:

>>> x1 = jnp.array([[2, -4, 6, -8],
...                 [-1, 5, -3, 7]])
>>> y1 = jnp.array([0, 3, -5, 9])
>>> jnp.less(x1, y1)
Array([[False,  True, False,  True],
       [ True, False, False,  True]], 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