mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-05 17:52:39 +02:00
fixes fixed and test updates
This commit is contained in:
parent
16bd44eb35
commit
11ca793d1f
3 changed files with 6 additions and 6 deletions
|
|
@ -135,7 +135,6 @@ class Param(OptimizationHandlable, ObservableArray):
|
||||||
constr = self.constraints.copy()
|
constr = self.constraints.copy()
|
||||||
priors = self.priors.copy()
|
priors = self.priors.copy()
|
||||||
p = Param(self.name, self.view(numpy.ndarray).copy(), self._default_constraint_)
|
p = Param(self.name, self.view(numpy.ndarray).copy(), self._default_constraint_)
|
||||||
import ipdb;ipdb.set_trace()
|
|
||||||
p.constraints = constr
|
p.constraints = constr
|
||||||
p.priors = priors
|
p.priors = priors
|
||||||
return p
|
return p
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ class Constrainable(Nameable, Indexable):
|
||||||
# Ensure that the fixes array is set:
|
# Ensure that the fixes array is set:
|
||||||
# Parameterized: ones(self.size)
|
# Parameterized: ones(self.size)
|
||||||
# Param: ones(self._realsize_
|
# Param: ones(self._realsize_
|
||||||
if not self._has_fixes(): self._fixes_ = np.ones(self.size, dtype=bool)
|
self._fixes_ = np.ones(self.size, dtype=bool)
|
||||||
|
|
||||||
def _set_fixed(self, index):
|
def _set_fixed(self, index):
|
||||||
self._ensure_fixes()
|
self._ensure_fixes()
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ class ParameterizedTest(unittest.TestCase):
|
||||||
self.white.fix(warning=False)
|
self.white.fix(warning=False)
|
||||||
self.test1.remove_parameter(self.test1.param)
|
self.test1.remove_parameter(self.test1.param)
|
||||||
self.assertTrue(self.test1._has_fixes())
|
self.assertTrue(self.test1._has_fixes())
|
||||||
|
import ipdb;ipdb.set_trace()
|
||||||
|
|
||||||
from GPy.core.parameterization.transformations import FIXED, UNFIXED
|
from GPy.core.parameterization.transformations import FIXED, UNFIXED
|
||||||
self.assertListEqual(self.test1._fixes_.tolist(),[UNFIXED,UNFIXED,FIXED])
|
self.assertListEqual(self.test1._fixes_.tolist(),[UNFIXED,UNFIXED,FIXED])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue