mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
fixed a tie-bug for ND
This commit is contained in:
parent
34edbd1459
commit
350c69799d
2 changed files with 2 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue