def test_compare(self):
"""Test the compare function
"""
xx = np.arange(10)
yy = (3 * xx)**2 + xx
models = {'simp': SimpleModel([2, 1])}
model_data = self.simSimp(models)
print(model_data)
print(yy)
res = self.simSimp.compare(model_data, (xx, (yy,), {'tau': 0}))
self.assertIsInstance(res, np.ndarray)
self.assertEqual(len(res), 10)
npt.assert_array_almost_equal(5 * xx**2, res)
评论列表
文章目录