1441eb9cc5eb424b5111f43890044ad5f46be2e3,tests/test_minkowski_space.py,TestMinkowskiSpaceMethods,test_squared_norm,#TestMinkowskiSpaceMethods#,112

Before Change


        point = gs.array([-2., 4.])

        result = self.metric.squared_norm(point)
        expected = gs.dot(point, point)
        expected -= 2 * point[self.time_like_dim] * point[self.time_like_dim]
        expected = helper.to_scalar(expected)
        with self.session():
            self.assertAllClose(result, expected)

    def test_squared_norm_vectorization(self):

After Change


        point = gs.array([-2., 4.])

        result = self.metric.squared_norm(point)
        expected = gs.array([[12.]])
        self.assertAllClose(result, expected)

    def test_squared_norm_vectorization(self):
        n_samples = 3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: geomstats/geomstats
Commit Name: 1441eb9cc5eb424b5111f43890044ad5f46be2e3
Time: 2018-12-12
Author: ninamio78@gmail.com
File Name: tests/test_minkowski_space.py
Class Name: TestMinkowskiSpaceMethods
Method Name: test_squared_norm


Project Name: geomstats/geomstats
Commit Name: 35e6ce06a3ef692f90166999e40a638035bb18b8
Time: 2018-12-12
Author: ninamio78@gmail.com
File Name: tests/test_euclidean_space.py
Class Name: TestEuclideanSpaceMethods
Method Name: test_inner_product_vectorization


Project Name: geomstats/geomstats
Commit Name: 15de53212565c6d8fda59f30258d69d67eed183f
Time: 2018-12-12
Author: ninamio78@gmail.com
File Name: tests/test_euclidean_space.py
Class Name: TestEuclideanSpaceMethods
Method Name: test_inner_product