test_lt_helper.py 文件源码

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

项目:latenttrees 作者: kaltwang 项目源码 文件源码
def test_norm_logpdf_generator(x, mu, std):
    def test(self):
        scipy_d = norm(mu, std)  # scipy normal distribution
        logpdf_scipy = scipy_d.logpdf(x)
        logpdf = lth.norm_logpdf(x, mu, std)
        # self.assertEqual(True, False)
        np.testing.assert_allclose(logpdf, logpdf_scipy)
    return test
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号