NumPy

numpy.ma.MaskType.clip

method

MaskType.clip()

Scalar method identical to the corresponding array attribute.

Please see ndarray.clip.