docstr: Tests that converting intrinsics to a matrix and back is consistent.
docstr_tok: ["Tests","that","converting","intrinsics","to","a","matrix","and","back","is","consistent","."]
code: def test_intrinsics_from_matrix_to_intrinsics_random(self):
      """Tests that converting intrinsics to a matrix and back is consistent."""
      tensor_size = np.random.randint(3)
      tensor_shape = np.random.randint(
          1, 10, size=(tensor_size)
      ).tolist()
      random_focal = np.random.normal(size=tensor_shape + [2])
      random_principal_point = np.random.normal(size=tensor_shape + [2])
      random_skew_coeff = np.random.normal(size=tensor_shape + [1])
  
      matrix = perspective.matrix_from_intrinsics(
          random_focal, random_principal_point, random_skew_coeff
      )
      (
          focal,
          principal_point,
          skew_coeff,
      ) = perspective.intrinsics_from_matrix(matrix)
      random_skew_coeff = np.reshape(random_skew_coeff, (1, 1))
  
      self.assertAllClose(random_focal, focal, rtol=1e-3)
      self.assertAllClose(
          random_principal_point, principal_point, rtol=1e-3
      )
      self.assertAllClose(random_skew_coeff, skew_coeff, rtol=1e-3)
  
imports: import math
  import sys
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.rendering.camera import perspective
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 14 for calling the PerspectiveTest obj's underlying member method code with example usage: obj.test_intrinsics_from_matrix_to_intrinsics_random() without return types