test_Simulation.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:F_UNCLE 作者: fraserphysics 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号