From 350c69799db66b8a5240d825018233d8c88d8103 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Thu, 2 May 2013 10:59:19 +0100 Subject: [PATCH] fixed a tie-bug for ND --- GPy/core/model.py | 1 + GPy/kern/kern.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/GPy/core/model.py b/GPy/core/model.py index f354ad6e..493a87d6 100644 --- a/GPy/core/model.py +++ b/GPy/core/model.py @@ -117,6 +117,7 @@ class model(parameterised): x = self._get_params() for index,constraint in zip(self.constrained_indices, self.constraints): g[index] = g[index] * constraint.gradfactor(x[index]) + [np.put(g, i, v) for i, v in [(t[0], np.sum(g[t])) for t in self.tied_indices]] if len(self.tied_indices) or len(self.fixed_indices): to_remove = np.hstack((self.fixed_indices+[t[1:] for t in self.tied_indices])) return np.delete(g,to_remove) diff --git a/GPy/kern/kern.py b/GPy/kern/kern.py index fd135bcb..5075b428 100644 --- a/GPy/kern/kern.py +++ b/GPy/kern/kern.py @@ -48,11 +48,7 @@ class kern(parameterised): def plot_ARD(self, ax=None): - """ - If an ARD kernel is present, it bar-plots the ARD parameters - - - """ + """If an ARD kernel is present, it bar-plots the ARD parameters""" if ax is None: ax = pb.gca() for p in self.parts: