class_docstr: Tests correctness of the Y = g(X) = X / norm(X) transformation.
class_docstr_tok: ["Tests","correctness","of","the","Y","=","g","(","X",")","=","X","\/","norm","(","X",")","transformation","."]
code: def testAssertsValidArgToInverse(self):
      uv = unit_vector.UnitVector(validate_args=True)
      with self.assertRaisesOpError("must be a unit vector"):
          self.evaluate(uv.inverse([0.5, 0.2, 0.1]))
  
      with self.assertRaisesOpError("last axis of `y` cannot be 1."):
          self.evaluate(uv.inverse([0.0, 0.0, 0.0, 1.0]))
  
      with self.assertRaisesOpError(
          "must be a unit vector|last axis of `y` cannot be 1."
      ):
          self.evaluate(uv.inverse([0.4, 0.5, 0.3, 1.0]))
  
file_path: probability/tensorflow_probability/python/bijectors/unit_vector_test.py
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import unit_vector
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the UnitVectorBijectorTest obj's underlying member method code with example usage: obj.testAssertsValidArgToInverse() without return types