dreye.round_to_precision#

dreye.round_to_precision(x, precision=1.0)[source]#

Round an array to a specified precision.

Parameters:
xarray-like

Values to round.

precisionfloat

Precision to round to. For example, if precision is 0.5, then values are rounded to the nearest multiple of 0.5.

Returns:
array-like

Values of x rounded to the specified precision.