有numpy / scipy的测试套件吗?

时间:2021-05-28 21:26:00

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.

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

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).

当然,我可以拿一堆我的脚本并逐个运行它们以确定它们是否继续工作,但是这无法防止在将来的某个时候我会尝试使用我没有做过的事情。以前使用它会破坏(或者更糟糕的是,默默地产生不存在)。

2 个解决方案

#1


49  

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.

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

#2


6  

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.

请注意,由Linux发行版提供的Scipy和Numpy所依赖的数学库的二进制包在某些情况下显示出被巧妙地破坏。建议使用numpy.test()和scipy.test()运行Numpy和Scipy测试套件,作为确认安装正常运行的第一步。如果没有,您可能想要尝试另一组二进制文件(如果可用),或者购买一些上述商业软件包。

from http://www.scipy.org/Download

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

#1


49  

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.

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

#2


6  

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.

请注意,由Linux发行版提供的Scipy和Numpy所依赖的数学库的二进制包在某些情况下显示出被巧妙地破坏。建议使用numpy.test()和scipy.test()运行Numpy和Scipy测试套件,作为确认安装正常运行的第一步。如果没有,您可能想要尝试另一组二进制文件(如果可用),或者购买一些上述商业软件包。

from http://www.scipy.org/Download

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