numpy.around()

numpy.around

numpy.around(a, decimals=0, out=None) [source]

Evenly round to the given number of decimals.

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.

out : ndarray, optional

Alternative output array in which to place the result. I