test_stats.py 文件源码

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

项目:bayestsa 作者: thalesians 项目源码 文件源码
def test_cov2cor(self):
        cov = (( 4.        , -0.8660254, -2.23606798),
               (-0.8660254 ,  3.       ,  1.161895  ),
               (-2.23606798,  1.161895 ,  5.        ))
        cor = stats.cov2cor(cov)
        npt.assert_almost_equal(cor, (
                ( 1.0 , -0.25, -0.5),
                (-0.25,  1.0 ,  0.3),
                (-0.5 ,  0.3 ,  1.0)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号