jax.numpy.round
jax.numpy.round#
- jax.numpy.round(a, decimals=0, out=None)[source]#
Evenly round to the given number of decimals.
LAX-backend implementation of
numpy.around()
.Original docstring below.
- Parameters
a (array_like) – Input data.
decimals (int, optional) – Number of decimal places to round to (default: 0). If decimals is negative, it specifies the number of positions to the left of the decimal point.
- Returns
rounded_array – An array of the same type as a, containing the rounded values. Unless out was specified, a new array is created. A reference to the result is returned.
The real and imaginary parts of complex numbers are rounded separately. The result of rounding a float is a float.
- Return type
References
- 1
“Lecture Notes on the Status of IEEE 754”, William Kahan, https://people.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF