bundles / numpy 2.4.3 / numpy / ma / core / MaskedArray / round
function
numpy.ma.core:MaskedArray.round
source: /numpy/ma/core.py:5568
Signature
def round(self, decimals = 0, out = None)Summary
Return each element rounded to the given number of decimals.
Extended Summary
Refer to numpy.around for full documentation.
Examples
import numpy as np import numpy.ma as ma x = ma.array([1.35, 2.5, 1.5, 1.75, 2.25, 2.75], mask=[0, 0, 0, 1, 0, 0]) ma.round(x)
See also
- numpy.around
equivalent function
- numpy.ndarray.round
corresponding function for ndarrays
Aliases
numpy.ma.MaskedArray.round