有没有numpy/scipy的测试套件?

2024-04-30 02:37:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我要在我的Ubuntu Lucid上重新安装numpyscipy。由于这些东西有很多依赖关系,我想知道是否有一个全面的测试套件来检查新安装是否真的有效。

当然,我可以把我的一堆脚本一个接一个地运行,看看它们是否能继续工作,但这并不能防止将来某个时候,我会尝试使用一些我以前没有使用过的东西,然后它会崩溃(或者,更糟的是,无声地产生无意义)。


Tags: numpy脚本套件关系ubuntuscipy意义我会
2条回答

是的。两个包对此都有一个test方法。

import numpy
numpy.test('full')

import scipy
scipy.test('full')

注意,如果您没有安装nose,它会告诉您需要它。

Note that binary packages for the mathematical libraries Scipy and Numpy depend on, shipped by Linux distributions, have in some cases showed to be subtly broken. Running Numpy and Scipy test suites with numpy.test() and scipy.test() is recommended, as a first step to confirm that your installation functions properly. If it doesn't, you may want to try another set of binaries if available, or buy some above-mentioned commercial packages.

来自http://www.scipy.org/Download

相关问题 更多 >