test_regression.py 文件源码

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

项目:radar 作者: amoose136 项目源码 文件源码
def test_zeros(self):
        # Regression test for #1061.
        # Set a size which cannot fit into a 64 bits signed integer
        sz = 2 ** 64
        good = 'Maximum allowed dimension exceeded'
        try:
            np.empty(sz)
        except ValueError as e:
            if not str(e) == good:
                self.fail("Got msg '%s', expected '%s'" % (e, good))
        except Exception as e:
            self.fail("Got exception of type %s instead of ValueError" % type(e))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号