Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.fix

Contents

jax.numpy.fix#

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

Round input to the nearest integer towards zero.

JAX implementation ofnumpy.fix().

Parameters:
  • x (ArrayLike) – input array.

  • out (None) – unused by JAX.

Returns:

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

Return type:

Array

See also

Examples

>>>key=jax.random.key(0)>>>x=jax.random.uniform(key,(3,3),minval=-5,maxval=5)>>>withjnp.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)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp