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

jax.numpy.fix — JAX documentation

jax.numpy.fix#
jax.numpy.fix(x, out=None)[source]#

Round input to the nearest integer towards zero.

JAX implementation of numpy.fix().

Parameters:
  • x (ArrayLike) – input array.

  • out (None) – unused by JAX.

Returns:

An array with same shape and dtype as x containing the rounded values.

Return type:

Array

Examples

>>> key = jax.random.key(0)
>>> x = jax.random.uniform(key, (3, 3), minval=-5, maxval=5)
>>> with jnp.printoptions(precision=2, suppress=True):
...     print(x)
[[ 4.48  4.79 -1.68]
 [-0.31  0.7  -3.34]
 [-1.9   1.89  2.47]]
>>> jnp.fix(x)
Array([[ 4.,  4., -1.],
       [-0.,  0., -3.],
       [-1.,  1.,  2.]], 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