docstr: Tests the C++ code-path.
docstr_tok: ["Tests","the","C++","code-path","."]
code: def test_arg_signature_of_value(self):
      """Tests the C++ code-path."""
      jax_enable_x64 = config.enable_x64.value
  
      # 1. Numpy scalar types
      for dtype in jtu.supported_dtypes():
          value = dtype(0)
  
          signature = jaxlib.jax_jit._ArgSignatureOfValue(
              value, jax_enable_x64
          )
          self.assertEqual(signature.dtype, jax.device_put(value).dtype)
          self.assertEqual(signature.shape, ())
          self.assertFalse(signature.weak_type)
  
      # 2. Numpy arrays
      for dtype in jtu.supported_dtypes():
          value = np.zeros((3, 4), dtype=dtype)
  
          signature = jaxlib.jax_jit._ArgSignatureOfValue(
              value, jax_enable_x64
          )
          self.assertEqual(signature.dtype, jax.device_put(value).dtype)
          self.assertEqual(signature.shape, (3, 4))
          self.assertFalse(signature.weak_type)
  
      int_type = dtypes.canonicalize_dtype(np.int64)
      float_type = dtypes.canonicalize_dtype(np.float64)
      complex_type = dtypes.canonicalize_dtype(np.complex128)
  
      # 3. Python scalar types
      # int
      signature = jaxlib.jax_jit._ArgSignatureOfValue(1, jax_enable_x64)
      self.assertEqual(signature.dtype, jax.device_put(1).dtype)
      self.assertEqual(signature.dtype, int_type)
      self.assertEqual(signature.shape, ())
      self.assertTrue(signature.weak_type)
      # float
      signature = jaxlib.jax_jit._ArgSignatureOfValue(
          1.0, jax_enable_x64
      )
      self.assertEqual(signature.dtype, jax.device_put(1.0).dtype)
      self.assertEqual(signature.dtype, float_type)
      self.assertEqual(signature.shape, ())
      self.assertTrue(signature.weak_type)
      # bool
      for bool_value in [True, False]:
          signature = jaxlib.jax_jit._ArgSignatureOfValue(
              bool_value, jax_enable_x64
          )
          self.assertEqual(
              signature.dtype, jax.device_put(bool_value).dtype
          )
          self.assertEqual(signature.dtype, np.bool_)
          self.assertEqual(signature.shape, ())
          self.assertTrue(signature.weak_type)
      # Complex
      if not (jax_enable_x64 and jtu.test_device_matches(["tpu"])):
          # No TPU support for complex128.
          signature = jaxlib.jax_jit._ArgSignatureOfValue(
              1 + 1j, jax_enable_x64
          )
          self.assertEqual(
              signature.dtype, jax.device_put(1 + 1j).dtype
          )
          self.assertEqual(signature.dtype, complex_type)
          self.assertEqual(signature.shape, ())
          self.assertTrue(signature.weak_type)
  
imports: import inspect
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax import dtypes
  from jax import numpy
  from jax._src import api_util
  from jax._src import config
  from jax._src import core
  from jax._src import lib
  from jax._src import test_util
  from jax._src.interpreters import pxla
  import numpy
label_desc: Use image node_id 8 for calling the JaxJitTest obj's underlying member method code with example usage: obj.test_arg_signature_of_value() without return types