This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / ma / extras / union1d

function

numpy.ma.extras:union1d

source: build-install/usr/lib/python3.14/site-packages/numpy/ma/extras.py :1463

Signature

def   union1d ( ar1 ar2 )

Summary

Union of two arrays.

Extended Summary

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

Examples

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)

See also

numpy.union1d

Equivalent function for ndarrays.

Aliases

  • numpy.ma.union1d