mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-07-17 16:41:04 +02:00
Update pickle_tests.py
This commit is contained in:
parent
0a1b3a909f
commit
2dbd799831
1 changed files with 8 additions and 6 deletions
|
|
@ -60,13 +60,15 @@ class Test(ListDictTestCase):
|
||||||
pio2 = pickle.load(f)
|
pio2 = pickle.load(f)
|
||||||
self.assertListDictEquals(pio._properties, pio2._properties)
|
self.assertListDictEquals(pio._properties, pio2._properties)
|
||||||
|
|
||||||
with tempfile.TemporaryFile('w+b') as f:
|
f = tempfile.TemporaryFile('w+b')
|
||||||
|
|
||||||
|
with f:
|
||||||
pickle.dump(piov, f)
|
pickle.dump(piov, f)
|
||||||
f.seek(0)
|
|
||||||
pio2 = pickle.load(f)
|
pio2 = GPy.load(f)
|
||||||
#py3 fix
|
#py3 fix
|
||||||
#self.assertListDictEquals(dict(piov.items()), dict(pio2.iteritems()))
|
#self.assertListDictEquals(dict(piov.items()), dict(pio2.iteritems()))
|
||||||
self.assertListDictEquals(dict(piov.items()), dict(pio2.items()))
|
self.assertListDictEquals(dict(piov.items()), dict(pio2.items()))
|
||||||
|
|
||||||
def test_param(self):
|
def test_param(self):
|
||||||
param = Param('test', np.arange(4*2).reshape(4,2))
|
param = Param('test', np.arange(4*2).reshape(4,2))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue