Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.floor

Contents

jax.numpy.floor#

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

Round input to the nearest integer downwards.

JAX implementation ofnumpy.floor.

Parameters:

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

Returns:

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

Return type:

Array

See also

Examples

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

[8]ページ先頭

©2009-2025 Movatter.jp