Skip to content
masterclass Buddy

NumPy · Function

np.isin

Tests whether each value in an array occurs in another collection. It returns a Boolean mask with the same shape as element.

Last updated

Syntax

numpy.isin(element, test_elements, assume_unique=False, invert=False, *, kind=None)

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

Subscribe
  • numpy.ma.isin
  • numpy.nonzero
  • numpy.in1d

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