numpy / 1.22.0 / reference / generated / numpy.ma.common_fill_value.html /

numpy.ma.common_fill_value

ma. common_fill_value ( a, b ) [source]

Return the common filling value of two masked arrays, if any.

If a.fill_value == b.fill_value, return the fill value, otherwise return None.

Parameters
a, b MaskedArray

The masked arrays for which to compare fill values.

Returns
fill_value scalar or None

The common fill value, or None.

Examples

>>> x = np.ma.array([0, 1.], fill_value=3)
>>> y = np.ma.array([0, 1.], fill_value=3)
>>> np.ma.common_fill_value(x, y)
3.0

© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.22/reference/generated/numpy.ma.common_fill_value.html