This is a pre-release version (2.5.0.dev0+git20251130.2de293a).Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / MaskedArray / round

function

numpy.ma.core:MaskedArray.round

source: build-install/usr/lib/python3.14/site-packages/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