removed randomness from inference tests by setting np.seed

This commit is contained in:
James Hensman 2015-08-13 09:10:16 +01:00
parent 0883c2e556
commit affd538687
2 changed files with 2 additions and 0 deletions

View file

@ -13,6 +13,7 @@ import GPy
class InferenceXTestCase(unittest.TestCase): class InferenceXTestCase(unittest.TestCase):
def genData(self): def genData(self):
np.random.seed(1)
D1,D2,N = 12,12,50 D1,D2,N = 12,12,50
x = np.linspace(0, 4 * np.pi, N)[:, None] x = np.linspace(0, 4 * np.pi, N)[:, None]

View file

@ -7,6 +7,7 @@ _lim_val_exp = np.log(_lim_val)
_lim_val_square = np.sqrt(_lim_val) _lim_val_square = np.sqrt(_lim_val)
_lim_val_cube = cbrt(_lim_val) _lim_val_cube = cbrt(_lim_val)
from GPy.likelihoods.link_functions import Identity, Probit, Cloglog, Log, Log_ex_1, Reciprocal, Heaviside from GPy.likelihoods.link_functions import Identity, Probit, Cloglog, Log, Log_ex_1, Reciprocal, Heaviside
#np.seterr(over='raise')
class LinkFunctionTests(np.testing.TestCase): class LinkFunctionTests(np.testing.TestCase):
def setUp(self): def setUp(self):