126664f626f28f20e9f460c1cf5f6bf4643ce096,testing/test_data_object.py,TestDataHolderModels,test_vgp,#TestDataHolderModels#,180

Before Change


        with self.test_context():
            m = gpflow.models.VGP(self.X, self.Y, self.kern,
                               likelihood=gpflow.likelihoods.StudentT())
            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")

After Change


            Ynew = np.sin(Xnew) + 0.9 * np.cos(Xnew * 1.6) + rng.randn(*Xnew.shape)
            with self.assertRaises(gpflow.GPflowError):
                m.X = Xnew
            with self.assertRaises(gpflow.GPflowError):
                m.Y = Ynew


if __name__ == "__main__":
    unittest.main()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

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_vgp


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_gpmc


Project Name: sassoftware/python-dlpy
Commit Name: b49758be2bc75c281ce937ffa40fb13228dc38d5
Time: 2019-01-09
Author: 34170572+wenyushi@users.noreply.github.com
File Name: dlpy/tests/test_network.py
Class Name: TestNetwork
Method Name: test_inputs


Project Name: GPflow/GPflow
Commit Name: d6883d26b557cbeeaceba38643bf5b98819fbed3
Time: 2017-09-26
Author: art.art.v@gmail.com
File Name: testing/test_model.py
Class Name: TestKeyboardCatching
Method Name: test_optimize_np