diff --git a/GPy/likelihoods/Gaussian.py b/GPy/likelihoods/Gaussian.py index e08fee90..d87b1b98 100644 --- a/GPy/likelihoods/Gaussian.py +++ b/GPy/likelihoods/Gaussian.py @@ -51,11 +51,15 @@ class Gaussian(likelihood): return ["noise_variance"] def _set_params(self, x): - x = float(x) + x = np.float64(x) if self._variance != x: - self.precision = 1. / x + if x == 0.: + self.precision = None + self.V = None + else: + self.precision = 1. / x + self.V = (self.precision) * self.Y self.covariance_matrix = np.eye(self.N) * x - self.V = (self.precision) * self.Y self._variance = x def predictive_values(self, mu, var, full_cov):