mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
[paramz] test warning catches
This commit is contained in:
parent
942c134ab7
commit
97593309ef
4 changed files with 68 additions and 57 deletions
|
|
@ -28,7 +28,10 @@ class InferenceXTestCase(unittest.TestCase):
|
|||
def test_inferenceX_BGPLVM_RBF(self):
|
||||
Ys = self.genData()
|
||||
m = GPy.models.BayesianGPLVM(Ys,3,kernel=GPy.kern.RBF(3,ARD=True))
|
||||
m.optimize()
|
||||
import warnings
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
m.optimize()
|
||||
x, mi = m.infer_newX(m.Y, optimize=True)
|
||||
np.testing.assert_array_almost_equal(m.X.mean, mi.X.mean, decimal=2)
|
||||
np.testing.assert_array_almost_equal(m.X.variance, mi.X.variance, decimal=2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue