test_finance.py 文件源码

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

项目:cupy 作者: cupy 项目源码 文件源码
def test_monte_carlo(self):
        output = example_test.run_example(
            'finance/monte_carlo.py', '--n-options', '10',
            '--n-samples-per-thread', '10',
            '--n-threads-per-option', '10')
        six.assertRegex(
            self, output.decode('utf-8'),
            r'initializing...\n' +
            r'start computation\n' +
            r'    # of options: 10\n' +
            r'    # of samples per option: 100\n' +
            r'GPU \(CuPy, Monte Carlo method\):\t[0-9\.]+ sec\n' +
            r'Error: [0-9\.]+')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号