class_docstr: Tests for Numpy indexing translation rules.
class_docstr_tok: ["Tests","for","Numpy","indexing","translation","rules","."]
code: def testAdvancedIndexingManually(self):
      x = onp.random.RandomState(0).randn(3, 4, 5)
      index_array = onp.array([0, 2, -1, 0])
  
      op = lambda x, index_array: x[..., index_array, :]
      cop = npe.jit(op)
  
      a1 = op(x, index_array)
      a2 = cop(x, index_array)
  
      self.assertAllClose(a1, a2, check_dtypes=True)
  
      op = lambda x, index_array: x[
          ..., index_array, :, index_array, None
      ]
      cop = npe.jit(op)
  
      a1 = op(x, index_array)
      a2 = cop(x, index_array)
  
      self.assertAllClose(a1, a2, check_dtypes=True)
  
      op = lambda x, index_array: x[
          index_array, ..., index_array[:, None], None
      ]
      cop = npe.jit(op)
  
      a1 = op(x, index_array)
      a2 = cop(x, index_array)
  
      self.assertAllClose(a1, a2, check_dtypes=True)
  
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
  import tensorflow.compat.v2
  import trax.tf_numpy.extensions
  import trax.tf_numpy.numpy
  from trax.tf_numpy.jax_tests.config import config
  import trax.tf_numpy.jax_tests.test_util
label_desc: Use image node_id 7 for calling the IndexingTest obj's underlying member method code with example usage: obj.testAdvancedIndexingManually() without return types