mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-10 12:32:40 +02:00
bugfix: couldn't constrain single parameters, because of indexing of np
This commit is contained in:
parent
39b68be5ed
commit
3a8a1914f2
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ from transformations import Logexp, NegativeLogexp, Logistic, __fixed__, FIXED,
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import re
|
import re
|
||||||
|
|
||||||
__updated__ = '2014-04-15'
|
__updated__ = '2014-04-16'
|
||||||
|
|
||||||
class HierarchyError(Exception):
|
class HierarchyError(Exception):
|
||||||
"""
|
"""
|
||||||
|
|
@ -467,7 +467,7 @@ class Constrainable(Nameable, Indexable, Observable):
|
||||||
Constrain the parameter to the given
|
Constrain the parameter to the given
|
||||||
:py:class:`GPy.core.transformations.Transformation`.
|
:py:class:`GPy.core.transformations.Transformation`.
|
||||||
"""
|
"""
|
||||||
self.param_array[:] = transform.initialize(self.param_array)
|
self.param_array[...] = transform.initialize(self.param_array)
|
||||||
reconstrained = self.unconstrain()
|
reconstrained = self.unconstrain()
|
||||||
self._add_to_index_operations(self.constraints, reconstrained, transform, warning)
|
self._add_to_index_operations(self.constraints, reconstrained, transform, warning)
|
||||||
self.notify_observers(self, None if trigger_parent else -np.inf)
|
self.notify_observers(self, None if trigger_parent else -np.inf)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue