, mask=False, copy=True, fill_value=None)

Return (a copy of) a where invalid data (nan/inf) are masked and replaced by fill_value.

Note that a copy is performed by default (just in case...).


a : array_like

A (subclass of) ndarray.

copy : bool

Whether to use a copy of a (True) or to fix a in place (False).

fill_value : {var}, optional

Value used for fixing invalid data. If not given, the output of get_fill_value(a) is used instead.


b : MaskedArray

Previous topic

Next topic

This Page

Quick search