是否有 numpy/scipy 的测试套件? [英] Is there a test suite for numpy / scipy?
问题描述
我将在我的 Ubuntu Lucid 上重新安装 numpy
和 scipy
.由于这些东西带有很多依赖项,我想知道是否有一个全面的测试套件来检查新安装是否真的有效.
I'm about to reinstall numpy
and scipy
on my Ubuntu Lucid. As these things carry quite a few dependencies, I'm wondering if there is a comprehensive test suite to check if the new install really works.
当然,我可以拿一堆我的脚本一个一个地运行它们,看看它们是否继续工作,但这并不能防止将来某个时候我会尝试使用的情况我以前没有使用过的东西,它会坏掉(或者,更糟糕的是,默默地产生废话).
Of course, I can just take a bunch of my scripts and run them one by one to see if they keep working, but that won't guard against a situation where at some point in the future I'll try to use something I didn't use before and it'll break (or, worse, silently produce nonsence).
推荐答案
是的.这两个包都有一个 test
方法.
Yes. Both packages have a test
method for this.
import numpy
numpy.test('full')
import scipy
scipy.test('full')
您需要有 pytest 和 hypothesis 已安装以运行 numpy.test
.
You will need to have pytest and hypothesis installed to run numpy.test
.
这篇关于是否有 numpy/scipy 的测试套件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!