class_docstr: Tests for Numpy indexing translation rules.
class_docstr_tok: ["Tests","for","Numpy","indexing","translation","rules","."]
code: def testAdvancedIntegerIndexing(
      self, name, shape, dtype, rng_factory, indexer
  ):
      rng = rng_factory()
      args_maker = lambda: [rng(shape, dtype), indexer]
      onp_fun = lambda x, idx: x[idx]
      jnp_fun = lambda x, idx: onp_fun(tnp.asarray(x), idx)
  
      self._CheckAgainstNumpy(
          onp_fun, jnp_fun, args_maker, check_dtypes=True
      )
      # TODO(wangpeng): check_xla_forced_compile is turned off for
      # ListOfPythonIntsAndIntArrays because it throws "The number of output
      # elements has to equal to number of input elements that are sliced when
      # input indices are not constant". Investigate and turn it on.
      check_xla = name != "ListOfPythonIntsAndIntArrays"
      self._CompileAndCheck(
          jnp_fun,
          args_maker,
          check_dtypes=True,
          check_incomplete_shape=True,
          check_xla_forced_compile=check_xla,
      )
  
imports: import collections
  import enum
  from functools import partial
  import itertools
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import config
  from tensorflow.python.ops.numpy_ops.tests.config import config
  import tensorflow.python.ops.numpy_ops.tests.extensions
  import tensorflow.python.ops.numpy_ops.tests.np_wrapper
  import tensorflow.python.ops.numpy_ops.tests.test_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 5 for calling the IndexingTest obj's underlying member method code with example usage: obj.testAdvancedIntegerIndexing(name, shape, dtype, rng_factory, indexer) without return types