我正在使用 Mac OSX 中预装的 python 2.7 和 numpy 1.6。下载页面建议安装后用nose测试一下,看看安装是否正确,所以我做了
import numpy as np
np.test('full')
它给了我以下错误:
Running unit tests for numpy NumPy version 1.6.1 NumPy is installed in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy Python version 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] nose version
1.3.0
(这里我省略了测试过程中出现的点)
======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/testing/decorators.py", line 215, in knownfailer
return f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/tests/test_numeric.py", line 321, in test_floating_exceptions
lambda a,b:a/b, ft_tiny, ft_max)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/tests/test_numeric.py", line 271, in assert_raises_fpe
"Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/testing/utils.py", line 34, in assert_
raise AssertionError(msg)
AssertionError: Type <type 'numpy.complex64'> did not raise fpe error ''.
====================================================================== FAIL: test_kind.TestKind.test_all
---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Python/2.7/site-packages/nose-1.3.0-py2.7.egg/nose/case.py", line 197, in runTest
self.test(*self.arg) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/f2py/tests/test_kind.py", line 30, in test_all
'selectedrealkind(%s): expected %r but got %r' % (i, selected_real_kind(i), selectedrealkind(i))) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/testing/utils.py", line 34, in assert_
raise AssertionError(msg) AssertionError: selectedrealkind(19): expected -1 but got 16
---------------------------------------------------------------------- Ran 3552 tests in 38.427s
FAILED (KNOWNFAIL=3, SKIP=1, failures=2) <nose.result.TextTestResult run=3552 errors=0 failures=2>
谁能指出我正确的方向来解决这个问题?那将不胜感激。谢谢!