code: def test_intersect1d_indices(self):
      # unique inputs
      a = np.array([1, 2, 3, 4])
      b = np.array([2, 1, 4, 6])
      c, i1, i2 = intersect1d(
          a, b, assume_unique=True, return_indices=True
      )
      ee = np.array([1, 2, 4])
      assert_array_equal(c, ee)
      assert_array_equal(a[i1], ee)
      assert_array_equal(b[i2], ee)
  
      # non-unique inputs
      a = np.array([1, 2, 2, 3, 4, 3, 2])
      b = np.array([1, 8, 4, 2, 2, 3, 2, 3])
      c, i1, i2 = intersect1d(a, b, return_indices=True)
      ef = np.array([1, 2, 3, 4])
      assert_array_equal(c, ef)
      assert_array_equal(a[i1], ef)
      assert_array_equal(b[i2], ef)
  
      # non1d, unique inputs
      a = np.array([[2, 4, 5, 6], [7, 8, 1, 15]])
      b = np.array([[3, 2, 7, 6], [10, 12, 8, 9]])
      c, i1, i2 = intersect1d(
          a, b, assume_unique=True, return_indices=True
      )
      ui1 = np.unravel_index(i1, a.shape)
      ui2 = np.unravel_index(i2, b.shape)
      ea = np.array([2, 6, 7, 8])
      assert_array_equal(ea, a[ui1])
      assert_array_equal(ea, b[ui2])
  
      # non1d, not assumed to be uniqueinputs
      a = np.array([[2, 4, 5, 6, 6], [4, 7, 8, 7, 2]])
      b = np.array([[3, 2, 7, 7], [10, 12, 8, 7]])
      c, i1, i2 = intersect1d(a, b, return_indices=True)
      ui1 = np.unravel_index(i1, a.shape)
      ui2 = np.unravel_index(i2, b.shape)
      ea = np.array([2, 7, 8])
      assert_array_equal(ea, a[ui1])
      assert_array_equal(ea, b[ui2])
  
imports: import numpy
  from numpy import ediff1d, intersect1d, setxor1d, union1d, setdiff1d, unique, isin
  from numpy.exceptions import AxisError
  from numpy.testing import assert_array_equal, assert_equal, assert_raises, assert_raises_regex
  import pytest
label_desc: Use image node_id 3 for calling the TestSetOps obj's underlying member method code with example usage: obj.test_intersect1d_indices() without return types