c1f116ffdced6cf3705b37868e55c4e2b258650b,geomstats/geometry/special_orthogonal.py,SpecialOrthogonal,regularize_tangent_vec,#SpecialOrthogonal#Any#Any#Any#Any#,262

Before Change


                // TODO(nina): Check if/how regularization is needed in nD?
                regularized_tangent_vec = tangent_vec

        elif point_type == "matrix":
            regularized_tangent_vec = tangent_vec

        return regularized_tangent_vec

After Change


            if gs.allclose(base_point, self.identity):
                return self.regularize_tangent_vec_at_identity(
                    tangent_vec, point_type=point_type)
            inv_base_point = self.inverse(base_point)
            tangent_vec_at_id = self.compose(inv_base_point, tangent_vec)
            regularized_tangent_vec = self.regularize_tangent_vec_at_identity(
                tangent_vec_at_id, point_type=point_type)
            regularized_tangent_vec = self.compose(
                base_point, regularized_tangent_vec)

        else:
            raise ValueError("point_type should be \"vector\" or \"matrix\".")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: geomstats/geomstats
Commit Name: c1f116ffdced6cf3705b37868e55c4e2b258650b
Time: 2020-04-06
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/special_orthogonal.py
Class Name: SpecialOrthogonal
Method Name: regularize_tangent_vec


Project Name: geomstats/geomstats
Commit Name: d496aaefc795e176b615815e9f30f335860f013b
Time: 2018-01-22
Author: ninamio78@gmail.com
File Name: geomstats/lie_group.py
Class Name: LieGroup
Method Name: group_log


Project Name: Qiskit/qiskit-aqua
Commit Name: 7ed25c1db031d602e669c04c60ff431016214742
Time: 2019-04-03
Author: shaohan.hu@ibm.com
File Name: qiskit/aqua/components/feature_maps/pauli_expansion.py
Class Name: PauliExpansion
Method Name: construct_circuit