ac24bfe744774df11dfc075397970c75e0fc5206,geomstats/geometry/lie_algebra.py,MatrixLieAlgebra,orthonormal_basis,#MatrixLieAlgebra#,166

Before Change


        basis : array-like, shape=[dim, n, n]
            Orthonormal basis.
        
        metric_matrix = self.reshape_metric_matrix(metric_matrix) + gs.eye(
            self.n)
        return self.basis / gs.sqrt(2 * metric_matrix)

    def projection(self, mat):
        Project a matrix to the Lie Algebra.

After Change


        
        metric_matrix = self.reshape_metric_matrix(metric_matrix)
        norms = gs.sum(
            metric_matrix * self.basis * self.basis, (-2, -1))

        return gs.einsum("i, ikl->ikl", 1. / gs.sqrt(norms), self.basis)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: geomstats/geomstats
Commit Name: ac24bfe744774df11dfc075397970c75e0fc5206
Time: 2020-11-17
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/lie_algebra.py
Class Name: MatrixLieAlgebra
Method Name: orthonormal_basis


Project Name: nipy/dipy
Commit Name: 8d321682200b3d87c868bbf2684f9c38248fbf84
Time: 2019-07-18
Author: skab12@gmail.com
File Name: dipy/tracking/tests/test_utils.py
Class Name:
Method Name: test_density_map


Project Name: iskandr/fancyimpute
Commit Name: 9439f5215fde61ee40910b0320ff4dd8d28571e2
Time: 2016-01-10
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/bayesian_ridge_regression.py
Class Name: BayesianRidgeRegression
Method Name: fit


Project Name: Calamari-OCR/calamari
Commit Name: 8d0d0c7a6db3904f0222cbe058388a92cf21a548
Time: 2021-02-06
Author: ChWick@users.noreply.github.com
File Name: calamari_ocr/ocr/dataset/imageprocessors/scale_to_height_processor.py
Class Name: ScaleToHeightProcessor
Method Name: scale_to_h