From 45f87517690dacaf07c81a1739e08ffab4a83646 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Fri, 3 Oct 2014 11:55:58 +0100 Subject: [PATCH] Bug fixed --- GPy/core/parameterization/priors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPy/core/parameterization/priors.py b/GPy/core/parameterization/priors.py index b41cef3d..f3e0c9d7 100644 --- a/GPy/core/parameterization/priors.py +++ b/GPy/core/parameterization/priors.py @@ -320,7 +320,8 @@ class HalfT(Prior): return "hT(" + str(np.round(self.A)) + ', ' + str(np.round(self.nu)) + ')' def lnpdf(self,theta): - return self.constant*(theta>0) -.5*(self.nu+1) * np.log( 1.+ (1./self.nu) * (theta/self.A)**2 ) + stop + return (theta>0) * ( self.constant -.5*(self.nu+1) * np.log( 1.+ (1./self.nu) * (theta/self.A)**2 ) ) #theta = theta if isinstance(theta,np.ndarray) else np.array([theta]) #lnpdfs = np.zeros_like(theta)