code: def test_in1d(self, kind):
      # we use two different sizes for the b array here to test the
      # two different paths in in1d().
      for mult in (1, 10):
          # One check without np.array to make sure lists are handled correct
          a = [5, 7, 1, 2]
          b = [2, 4, 3, 1, 5] * mult
          ec = np.array([True, False, True, True])
          c = in1d(a, b, assume_unique=True, kind=kind)
          assert_array_equal(c, ec)
  
          a[0] = 8
          ec = np.array([False, False, True, True])
          c = in1d(a, b, assume_unique=True, kind=kind)
          assert_array_equal(c, ec)
  
          a[0], a[3] = 4, 8
          ec = np.array([True, False, True, False])
          c = in1d(a, b, assume_unique=True, kind=kind)
          assert_array_equal(c, ec)
  
          a = np.array([5, 4, 5, 3, 4, 4, 3, 4, 3, 5, 2, 1, 5, 5])
          b = [2, 3, 4] * mult
          ec = [
              False,
              True,
              False,
              True,
              True,
              True,
              True,
              True,
              True,
              False,
              True,
              False,
              False,
              False,
          ]
          c = in1d(a, b, kind=kind)
          assert_array_equal(c, ec)
  
          b = b + [5, 5, 4] * mult
          ec = [
              True,
              True,
              True,
              True,
              True,
              True,
              True,
              True,
              True,
              True,
              True,
              False,
              True,
              True,
          ]
          c = in1d(a, b, kind=kind)
          assert_array_equal(c, ec)
  
          a = np.array([5, 7, 1, 2])
          b = np.array([2, 4, 3, 1, 5] * mult)
          ec = np.array([True, False, True, True])
          c = in1d(a, b, kind=kind)
          assert_array_equal(c, ec)
  
          a = np.array([5, 7, 1, 1, 2])
          b = np.array([2, 4, 3, 3, 1, 5] * mult)
          ec = np.array([True, False, True, True, True])
          c = in1d(a, b, kind=kind)
          assert_array_equal(c, ec)
  
          a = np.array([5, 5])
          b = np.array([2, 2] * mult)
          ec = np.array([False, False])
          c = in1d(a, b, kind=kind)
          assert_array_equal(c, ec)
  
      a = np.array([5])
      b = np.array([2])
      ec = np.array([False])
      c = in1d(a, b, kind=kind)
      assert_array_equal(c, ec)
  
      if kind in {None, "sort"}:
          assert_array_equal(in1d([], [], kind=kind), [])
  
imports: import numpy
  from numpy.testing import assert_array_equal, assert_equal, assert_raises, assert_raises_regex
  from numpy.lib.arraysetops import ediff1d, intersect1d, setxor1d, union1d, setdiff1d, unique, in1d, isin
  import pytest
label_desc: Use image node_id 9 for calling the TestSetOps obj's underlying member method code with example usage: obj.test_in1d(kind) without return types