class_docstr: Tests correctness of the Y = scale @ x transformation.
code: def testNoBatch(self, is_static):
      # Corresponds to scale = [[2., 0], [0, 1.]]
      bijector = scale_matvec_diag.ScaleMatvecDiag(scale_diag=[2.0, 1])
      x = self.maybe_static([1.0, 1], is_static)
  
      # matmul(sigma, x)
      self.assertAllClose([2.0, 1], bijector.forward(x))
      self.assertAllClose([0.5, 1], bijector.inverse(x))
      self.assertAllClose(
          -np.log(2.0),
          bijector.inverse_log_det_jacobian(x, event_ndims=1),
      )
  
      # x is a 2-batch of 2-vectors.
      # The first vector is [1, 1], the second is [-1, -1].
      # Each undergoes matmul(sigma, x).
      x = self.maybe_static([[1.0, 1], [-1.0, -1]], is_static)
      self.assertAllClose([[2.0, 1], [-2.0, -1]], bijector.forward(x))
      self.assertAllClose([[0.5, 1], [-0.5, -1]], bijector.inverse(x))
      self.assertAllClose(
          -np.log(2.0),
          bijector.inverse_log_det_jacobian(x, event_ndims=1),
      )
  
file_path: probability/tensorflow_probability/python/bijectors/scale_matvec_diag_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow_probability.python.bijectors import scale_matvec_diag
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the ScaleMatvecDiagTest obj's underlying member method code with example usage: obj.testNoBatch(is_static) without return types