a3175090bbbeca4c3daa1cd9230b8f01c068f94a,tests/test_special_euclidean_group.py,TestSpecialEuclideanGroupMethods,test_inner_product_n_base_point_vectorization,#TestSpecialEuclideanGroupMethods#,1341

Before Change



            result = metric.inner_product(one_vector_a, n_vector_b,
                                          n_base_point)
            expected = gs.vstack([metric.inner_product(one_vector_a, vec_b,
                                                       base_point)
                                  for vec_b, base_point in zip(n_vector_b,
                                                               n_base_point)])
            gs.testing.assert_allclose(result, expected)

            result = metric.inner_product(n_vector_a, one_vector_b,
                                          n_base_point)
            expected = gs.vstack([metric.inner_product(vec_a, one_vector_b,
                                                       base_point)
                                  for vec_a, base_point in zip(n_vector_a,
                                                               n_base_point)])
            gs.testing.assert_allclose(result, expected)

            result = metric.inner_product(n_vector_a, n_vector_b,
                                          n_base_point)
            expected = gs.vstack([metric.inner_product(vec_a, vec_b,
                                                       base_point)
                                  for vec_a, vec_b, base_point in zip(
                                                                n_vector_a,
                                                                n_vector_b,
                                                                n_base_point)])
            gs.testing.assert_allclose(result, expected)

    @geomstats.tests.np_only
    def test_squared_dist_is_symmetric(self):
        for metric_type in self.metrics:

After Change



            result = metric.inner_product(n_vector_a, one_vector_b,
                                          n_base_point)
            self.assertAllClose(gs.shape(result), (n_samples, 1))

            result = metric.inner_product(n_vector_a, n_vector_b,
                                          n_base_point)
            self.assertAllClose(gs.shape(result), (n_samples, 1))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 30

Instances


Project Name: geomstats/geomstats
Commit Name: a3175090bbbeca4c3daa1cd9230b8f01c068f94a
Time: 2018-12-28
Author: ninamio78@gmail.com
File Name: tests/test_special_euclidean_group.py
Class Name: TestSpecialEuclideanGroupMethods
Method Name: test_inner_product_n_base_point_vectorization


Project Name: geomstats/geomstats
Commit Name: a3175090bbbeca4c3daa1cd9230b8f01c068f94a
Time: 2018-12-28
Author: ninamio78@gmail.com
File Name: tests/test_special_euclidean_group.py
Class Name: TestSpecialEuclideanGroupMethods
Method Name: test_inner_product_one_base_point_vectorization


Project Name: geomstats/geomstats
Commit Name: a3175090bbbeca4c3daa1cd9230b8f01c068f94a
Time: 2018-12-28
Author: ninamio78@gmail.com
File Name: tests/test_special_euclidean_group.py
Class Name: TestSpecialEuclideanGroupMethods
Method Name: test_inner_product_n_base_point_vectorization


Project Name: geomstats/geomstats
Commit Name: a3175090bbbeca4c3daa1cd9230b8f01c068f94a
Time: 2018-12-28
Author: ninamio78@gmail.com
File Name: tests/test_special_euclidean_group.py
Class Name: TestSpecialEuclideanGroupMethods
Method Name: test_inner_product_at_identity_vectorization