class_docstr: Tests for Numpy indexing translation rules.
class_docstr_tok: ["Tests","for","Numpy","indexing","translation","rules","."]
code: def testFloatIndexingError(self):
      error_regex = "only integers, slices.*are valid indices"
      # Verify onp behavior
      with self.assertRaisesRegex(IndexError, error_regex):
          _ = onp.zeros((2, 2))[(0, 0.0)]
      # Test jnp
      with self.assertRaisesRegex(IndexError, error_regex):
          jnp.zeros(2)[0.0]
      with self.assertRaisesRegex(IndexError, error_regex):
          jnp.zeros((2, 2))[(0, 0.0)]
      # Test with jit
      with self.assertRaisesRegex(IndexError, error_regex):
          npe.jit(lambda idx: jnp.zeros((2, 2))[idx])((0, 0.0))
  
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 18 for calling the IndexingTest obj's underlying member method code with example usage: obj.testFloatIndexingError() without return types