mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
Convert print to function for Python 3 compatibility. This breaks compatibility for versions of Python < 2.6
This commit is contained in:
parent
906f69e20e
commit
5601a580de
6 changed files with 18 additions and 19 deletions
|
|
@ -40,7 +40,7 @@ class Metropolis_Hastings:
|
|||
fcurrent = self.model.log_likelihood() + self.model.log_prior()
|
||||
accepted = np.zeros(Ntotal,dtype=np.bool)
|
||||
for it in range(Ntotal):
|
||||
print "sample %d of %d\r"%(it,Ntotal),
|
||||
print("sample %d of %d\r"%(it,Ntotal), end=' ')
|
||||
sys.stdout.flush()
|
||||
prop = np.random.multivariate_normal(current, self.cov*self.scale*self.scale)
|
||||
self.model._set_params_transformed(prop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue