Convert print to function for Python 3 compatibility. This breaks compatibility for versions of Python < 2.6

This commit is contained in:
Mike Croucher 2015-02-26 08:11:11 +00:00
parent 2ca24a88f5
commit 1521b3e260
10 changed files with 37 additions and 37 deletions

View file

@ -82,7 +82,7 @@ class GP(Model):
inference_method = exact_gaussian_inference.ExactGaussianInference()
else:
inference_method = expectation_propagation.EP()
print "defaulting to ", inference_method, "for latent function inference"
print("defaulting to ", inference_method, "for latent function inference")
self.inference_method = inference_method
logger.info("adding kernel and likelihood as parameters")
@ -441,7 +441,7 @@ class GP(Model):
try:
super(GP, self).optimize(optimizer, start, **kwargs)
except KeyboardInterrupt:
print "KeyboardInterrupt caught, calling on_optimization_end() to round things up"
print("KeyboardInterrupt caught, calling on_optimization_end() to round things up")
self.inference_method.on_optimization_end()
raise