#NEWLINE# def _test_grad( self , trans ) : #NEWLINE# #INDENT# np . random . seed ( 1234 ) #NEWLINE# m = TestModel ( np . random . uniform ( 0.5 , 1.5 , 20 ) ) #NEWLINE# prior = GPy . priors . LogGaussian ( 0.5 , 0.1 ) #NEWLINE# m . theta . set_prior ( prior ) #NEWLINE# m . theta . constrain ( trans ) #NEWLINE# m . randomize ( ) #NEWLINE# print ( m ) #NEWLINE# self . assertTrue ( m . checkgrad ( 1 ) )