dpnp.around

dpnp.around(x, /, decimals=0, out=None)[source]

Round an array to the given number of decimals.

For full documentation refer to numpy.around.

Parameters:
  • x ({dpnp.ndarray, usm_ndarray}) -- Input array, expected to have numeric data type.

  • 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.

  • out ({None, dpnp.ndarray}, optional) -- Output array to populate. Array must have the correct shape and the expected data type.

Returns:

out -- The rounded value of elements of the array.

Return type:

dpnp.ndarray

See also

dpnp.round

Equivalent function; see for details.

dpnp.ndarray.round

Equivalent function.

dpnp.rint

Round elements of the array to the nearest integer.

dpnp.ceil

Compute the ceiling of the input, element-wise.

dpnp.floor

Return the floor of the input, element-wise.

dpnp.trunc

Return the truncated value of the input, element-wise.

Notes

This function works the same as dpnp.round.