[param] hierarchy traversal easier now

This commit is contained in:
mzwiessele 2014-05-14 08:53:56 +01:00
parent cff37293d9
commit 8d6eed6010
4 changed files with 57 additions and 33 deletions

View file

@ -132,6 +132,9 @@ class Test(ListDictTestCase):
self.assertIsNot(par.full_gradient, pcopy.full_gradient)
self.assertTrue(pcopy.checkgrad())
self.assert_(np.any(pcopy.gradient!=0.0))
pcopy.optimize('bfgs')
par.optimize('bfgs')
np.testing.assert_allclose(pcopy.param_array, par.param_array, atol=.001)
with tempfile.TemporaryFile('w+b') as f:
par.pickle(f)
f.seek(0)