Round input to the nearest integer towards zero.
JAX implementation of numpy.fix()
.
x (ArrayLike) – input array.
out (None) – unused by JAX.
An array with same shape and dtype as x
containing the rounded values.
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