f371e5207d3719b257979729803d0fe5eae0e9cb,geomstats/riemannian_metric.py,RiemannianMetric,mean,#RiemannianMetric#Any#Any#Any#Any#,219

Before Change


        // TODO(nina): profile this code to study performance,
        // i.e. what to do with sq_dists_between_iterates.

        n_points = len(points)
        assert n_points > 0

        if weights is None:
            weights = gs.ones(n_points)

        n_weights = len(weights)
        assert n_points == n_weights
        sum_weights = gs.sum(weights)

        mean = points[0]

After Change


        // TODO(nina): profile this code to study performance,
        // i.e. what to do with sq_dists_between_iterates.

        points = gs.array(points)
        n_points = gs.shape(points)[0]
        assert n_points > 0

        if weights is None:
            weights = gs.ones(n_points)

        weights = gs.array(weights)
        n_weights = gs.shape(weights)[0]
        assert n_points == n_weights
        sum_weights = gs.sum(weights)

        mean = points[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 19

Instances


Project Name: geomstats/geomstats
Commit Name: f371e5207d3719b257979729803d0fe5eae0e9cb
Time: 2018-09-14
Author: ninamio78@gmail.com
File Name: geomstats/riemannian_metric.py
Class Name: RiemannianMetric
Method Name: mean


Project Name: geomstats/geomstats
Commit Name: f371e5207d3719b257979729803d0fe5eae0e9cb
Time: 2018-09-14
Author: ninamio78@gmail.com
File Name: geomstats/riemannian_metric.py
Class Name: RiemannianMetric
Method Name: variance


Project Name: geomstats/geomstats
Commit Name: 86d076b358f25ef617f0967a7cf0bb96e0b8c5be
Time: 2018-09-12
Author: ninamio78@gmail.com
File Name: geomstats/riemannian_metric.py
Class Name: RiemannianMetric
Method Name: mean


Project Name: geomstats/geomstats
Commit Name: 86d076b358f25ef617f0967a7cf0bb96e0b8c5be
Time: 2018-09-12
Author: ninamio78@gmail.com
File Name: geomstats/riemannian_metric.py
Class Name: RiemannianMetric
Method Name: variance