xrange fixes for Python 3

This commit is contained in:
Mike Croucher 2015-03-07 07:49:59 +00:00
parent 5eeb2f18e9
commit cf1c382acd
14 changed files with 29 additions and 29 deletions

View file

@ -166,7 +166,7 @@ class Coregionalize(Kern):
def update_gradients_diag(self, dL_dKdiag, X):
index = np.asarray(X, dtype=np.int).flatten()
dL_dKdiag_small = np.array([dL_dKdiag[index==i].sum() for i in xrange(self.output_dim)])
dL_dKdiag_small = np.array([dL_dKdiag[index==i].sum() for i in range(self.output_dim)])
self.W.gradient = 2.*self.W*dL_dKdiag_small[:, None]
self.kappa.gradient = dL_dKdiag_small