jax.lax.round
Warning
This page was created from a pull request (#9655).
jax.lax.round¶
- jax.lax.round(x, rounding_method=RoundingMethod.AWAY_FROM_ZERO)[source]¶
Elementwise round.
Rounds values to the nearest integer.
- Parameters
x (
Any
) – an array or scalar value to round.rounding_method (
RoundingMethod
) – the method to use when rounding halfway values (e.g., 0.5). Seelax.RoundingMethod
for the list of possible values.
- Return type
- Returns
An array containing the elementwise rounding of x.