def test_group_log_then_exp_from_identity(self):
     """
     Test that the group exponential
     and the group logarithm are inverse.
     Expect their composition to give the identity function.
     """
     point = gs.array([0.12])
     result = helper.group_log_then_exp_from_identity(group=self.group,
                                                      point=point)
     expected = self.group.regularize(point)
     self.assertAllClose(result, expected)
示例#2
0
    def test_group_log_then_exp_from_identity(self):
        """
        Test that the group exponential from the identity
        and the group logarithm from the identity
        are inverse.
        Expect their composition to give the identity function.
        """
        for element_type in self.elements:
            point = self.elements[element_type]
            result = helper.group_log_then_exp_from_identity(group=self.group,
                                                             point=point)
            expected = self.group.regularize(point)
            self.assertAllClose(result, expected)

            if geomstats.tests.tf_backend():
                break