是否有用于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')
请注意,如果您没有安装鼻子,它将告诉您您需要它.
Note that if you do not have nose installed, it will tell you that you need it.
这篇关于是否有用于numpy/scipy的测试套件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!