jax.numpy.fix

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

Round to nearest integer towards zero.

LAX-backend implementation of fix().

Original docstring below.

Round an array of floats element-wise to nearest integer towards zero. The rounded values are returned as floats.

Parameters

x (array_like) – An array of floats to be rounded

Returns

out – A float array with the same dimensions as the input. If second argument is not supplied then a float array is returned with the rounded values.

If a second argument is supplied the result is stored there. The return value out is then a reference to that array.

Return type

ndarray of floats