a92b7f81ab316f08bb907f3ace6e72b59ae21279,geomstats/geometry/invariant_metric.py,_InvariantMetricMatrix,inner_product_at_identity,#_InvariantMetricMatrix#Any#Any#,84

Before Change


        inner_prod : array-like, shape=[...]
            Inner-product of the two tangent vectors.
        
        aux_prod = tangent_vec_a * tangent_vec_b
        metric_mat = self.metric_mat_at_identity
        if (Matrices.is_diagonal(metric_mat)
                and self.lie_algebra is not None):
            aux_prod *= self.reshaped_metric_matrix
        inner_prod = gs.sum(aux_prod, axis=(-2, -1))
        return inner_prod

    def inner_product(self, tangent_vec_a, tangent_vec_b, base_point=None):
        Compute inner product of two vectors in tangent space at base point.

After Change


        if (Matrices.is_diagonal(metric_mat)
                and self.lie_algebra is not None):
            tan_b *= self.reshaped_metric_matrix
        inner_prod = Matrices.frobenius_product(
            tangent_vec_a, tan_b)
        return inner_prod

    def inner_product(self, tangent_vec_a, tangent_vec_b, base_point=None):
        Compute inner product of two vectors in tangent space at base point.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: geomstats/geomstats
Commit Name: a92b7f81ab316f08bb907f3ace6e72b59ae21279
Time: 2021-03-24
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/invariant_metric.py
Class Name: _InvariantMetricMatrix
Method Name: inner_product_at_identity


Project Name: geomstats/geomstats
Commit Name: a92b7f81ab316f08bb907f3ace6e72b59ae21279
Time: 2021-03-24
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMetricEuclidean
Method Name: inner_product


Project Name: geomstats/geomstats
Commit Name: a92b7f81ab316f08bb907f3ace6e72b59ae21279
Time: 2021-03-24
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/spd_matrices.py
Class Name: SPDMetricBuresWasserstein
Method Name: inner_product