mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
catching precision infinity exceptions
This commit is contained in:
parent
26dd629181
commit
cbdb89ffe8
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue