126664f626f28f20e9f460c1cf5f6bf4643ce096,testing/test_data_object.py,TestDataHolderModels,test_sgpr,#TestDataHolderModels#,112

Before Change



    def test_sgpr(self):
        with self.test_context():
            m = gpflow.models.SGPR(self.X, self.Y, self.kern, Z=self.X[::2])
            m.compile()
            m.X = self.rng.randn(*self.X.shape)
            self.assertFalse(
                m._needs_recompile,
                msg="Recompilation should be avoided for the same shape data")

            m.X = self.rng.randn(30, 1)
            self.assertFalse(
                m._needs_recompile,
                msg="For SGPR, recompilation should be avoided for the same shape data")

After Change



    def test_sgpr(self):
        with self.test_context():
            X, Y, kern, rng = self.setup()
            m = gpflow.models.SGPR(X, Y, kern, Z=X[::2])
            m.compile()
            m.X = rng.randn(*X.shape)
            with self.assertRaises(gpflow.GPflowError):
                m.X = rng.randn(30, 1)

    def test_gpmc(self):
        with self.test_context():
            X, Y, kern, rng = self.setup()
            m = gpflow.models.GPMC(X, Y, kern, likelihood=gpflow.likelihoods.StudentT())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 22

Instances


Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderModels
Method Name: test_sgpr


Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderModels
Method Name: test_svgp


Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderModels
Method Name: test_sgpmc


Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderModels
Method Name: test_gpr


Project Name: GPflow/GPflow
Commit Name: 126664f626f28f20e9f460c1cf5f6bf4643ce096
Time: 2017-10-30
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderModels
Method Name: test_sgpr