numpy.ma.union1d#

ma.union1d(ar1, ar2)[source]#

Union of two arrays.

The output is always a masked array. See numpy.union1d for more details.

See also

numpy.union1d

Equivalent function for ndarrays.

Examples

>>> ar1 = np.ma.array([1, 2, 3, 4])
>>> ar2 = np.ma.array([3, 4, 5, 6])
>>> np.ma.union1d(ar1, ar2)
masked_array(data=[1, 2, 3, 4, 5, 6],
         mask=False,
   fill_value=999999)