test_cuda.py 文件源码

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

项目:npstreams 作者: LaurentRDC 项目源码 文件源码
def test_ignore_nans(self):
        """ Test a sum of zeros with NaNs sprinkled """
        source = [np.zeros((16,), dtype = np.float) for _ in range(10)]
        source.append(np.full((16,), fill_value = np.nan))
        summed = csum(source, ignore_nan = True)
        self.assertTrue(np.allclose(summed, np.zeros_like(summed)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号