[ Web Proxy ]
URL:
Viewing: https://numpy.org/doc/stable/reference/generated/../generated/numpy.ma.union1d.html [Back]  [Original]

numpy.ma.union1d — NumPy v2.5 Manual
Back to top
Search the docs ...:

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

Try it in your browser!
>>> import numpy as np
>>> 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)

Web Proxy Viewer  |  New URL  |  Original Page