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

jax.numpy.floor — JAX documentation

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

Round input to the nearest integer downwards.

JAX implementation of numpy.floor.

Parameters:

x (ArrayLike) – input array or scalar. Must not have complex dtype.

Returns:

An array with same shape and dtype as x containing the values rounded to the nearest integer that is less than or equal to the value itself.

Return type:

Array

Examples

>>> key = jax.random.key(42)
>>> x = jax.random.uniform(key, (3, 3), minval=-5, maxval=5)
>>> with jnp.printoptions(precision=2, suppress=True):
...     print(x)
[[-0.11  1.8   1.16]
 [ 0.61 -0.49  0.86]
 [-4.25  2.75  1.99]]
>>> jnp.floor(x)
Array([[-1.,  1.,  1.],
       [ 0., -1.,  0.],
       [-5.,  2.,  1.]], dtype=float32)

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