test_sparse_array.py 文件源码

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

项目:SparseArray 作者: INGEOTEC 项目源码 文件源码
def test_finite():
    a = SparseArray.fromlist(random_lst(p=0.5))
    b = SparseArray.fromlist(random_lst(p=0.5))
    c = a / b
    res = [i for i in c.data if isfinite(i)]
    d = c.finite()
    [assert_almost_equals(v, w) for v, w in zip([x for x in res if x != 0],
                                                d.data)]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号