docstr: Tests the Jacobian of the distance to ray function.
docstr_tok: ["Tests","the","Jacobian","of","the","distance","to","ray","function","."]
code: def test_distance_to_ray_jacobian_random(self):
      """Tests the Jacobian of the distance to ray function."""
      eps = sys.float_info.epsilon
      tensor_size = np.random.randint(3)
      tensor_shape = np.random.randint(
          1, 10, size=(tensor_size)
      ).tolist()
      point_init = np.random.random(size=tensor_shape + [3])
      origin_init = np.random.random(size=tensor_shape + [3])
      direction_init = np.random.random(size=tensor_shape + [3])
      direction_init /= np.maximum(
          np.linalg.norm(direction_init, axis=-1, keepdims=True), eps
      )
  
      self.assert_jacobian_is_correct_fn(
          lambda x: point.distance_to_ray(
              x, origin_init, direction_init
          ),
          [point_init],
      )
      self.assert_jacobian_is_correct_fn(
          lambda x: point.distance_to_ray(
              point_init, x, direction_init
          ),
          [origin_init],
      )
      self.assert_jacobian_is_correct_fn(
          lambda x: point.distance_to_ray(point_init, origin_init, x),
          [direction_init],
      )
  
file_path: graphics/tensorflow_graphics/geometry/representation/tests/point_test.py
imports: import sys
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.geometry.representation import point
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 3 for calling the PointTest obj's underlying member method code with example usage: obj.test_distance_to_ray_jacobian_random() without return types