fixing the logexp (with MZ) and some stability issue in the stationary class

This commit is contained in:
James Hensman 2014-03-21 15:23:49 +00:00
parent 22dafabca2
commit 01271e3868
2 changed files with 7 additions and 12 deletions

View file

@ -152,12 +152,7 @@ class Stationary(Kern):
This term appears in derviatives.
"""
dist = self._scaled_dist(X, X2).copy()
if X2 is None:
nondiag = util.diag.offdiag_view(dist)
nondiag[:] = 1./nondiag
return dist
else:
return 1./np.where(dist != 0., dist, np.inf)
return 1./np.where(dist != 0., dist, np.inf)
def gradients_X(self, dL_dK, X, X2=None):
"""