diff --git a/GPy/likelihoods/Gaussian.py b/GPy/likelihoods/Gaussian.py index e08fee90..98227b16 100644 --- a/GPy/likelihoods/Gaussian.py +++ b/GPy/likelihoods/Gaussian.py @@ -53,7 +53,7 @@ class Gaussian(likelihood): def _set_params(self, x): x = float(x) if self._variance != x: - self.precision = 1. / x + self.precision = 1. / max(x, 1e-6) self.covariance_matrix = np.eye(self.N) * x self.V = (self.precision) * self.Y self._variance = x