Ejemplo n.º 1
0
 def test_save(self):
     fname = 'ezyrb.tmp'
     pod = POD()
     rbf = RBF()
     db = Database(param, snapshots.T)
     rom = ROM(db, pod, rbf)
     rom.fit()
     rom.save(fname)
Ejemplo n.º 2
0
 def test_load2(self):
     fname = 'ezyrb2.tmp'
     pod = POD()
     rbf = RBF()
     db = Database(param, snapshots.T)
     rom = ROM(db, pod, rbf)
     rom.fit()
     rom.save(fname, save_db=False)
     new_rom = ROM.load(fname)
     new_param = [-0.293344, -0.23120537]
     np.testing.assert_array_almost_equal(
         rom.predict(new_param),
         new_rom.predict(new_param)
     )