Skip to content
masterclass Buddy

NumPy · Function

np.union1d

Find the unique values present in either of two inputs. The result is a sorted NumPy array.

Last updated

Syntax

numpy.union1d(ar1, ar2)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • functools.reduce
  • numpy.ma.union1d

Source: numpy.union1d — NumPy v2.5 Manual. Checked 2026-11-03.