docstr: Checks the output of interpolate_attributes.
docstr_tok: ["Checks","the","output","of","interpolate_attributes","."]
code: def test_interpolate_attributes_random(self):
      """Checks the output of interpolate_attributes."""
      attributes = np.random.uniform(-1.0, 1.0, size=(3,))
      barycentric = np.random.uniform(0.0, 1.0, size=(3,))
      barycentric = barycentric / np.linalg.norm(
          barycentric, axis=-1, ord=1, keepdims=True
      )
  
      groundtruth = np.sum(attributes * barycentric, keepdims=True)
      attributes = np.reshape(attributes, (3, 1))
      prediction = glm.interpolate_attributes(attributes, barycentric)
      self.assertAllClose(groundtruth, prediction)
  
imports: import math
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_graphics.geometry.transformation import look_at
  from tensorflow_graphics.rendering.camera import perspective
  from tensorflow_graphics.rendering.opengl import math
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 38 for calling the MathTest obj's underlying member method code with example usage: obj.test_interpolate_attributes_random() without return types