ivy.round(x: ivy.NativeArray, f: Optional[ivy.Framework] = None) → ivy.NativeArray[source]

Rounds the values of an array to the nearest integer, element-wise.

  • x (array) – Input array containing elements to round.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


An array of the same shape and type as x, with the elements rounded to integers.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty