装好的scipy,进行测试,还有一点点没有通过。
letwave
|
1#
letwave 发表于 2006-11-19 15:31
装好的scipy,进行测试,还有一点点没有通过。
进行的测试如下:
import numpy numpy.test(1,1) import scipy scipy.test(10) 测试结果如下: numpy安装成功,而scipy好像还有问题,哪为高手看看,我还需要解决什么问题,或者,不许要管就可 以正常用scipy了。谢谢 Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> numpy.test(1,1) Found 5 tests for numpy.distutils.misc_util Found 3 tests for numpy.lib.getlimits Found 31 tests for numpy.core.numerictypes Found 32 tests for numpy.linalg Found 13 tests for numpy.core.umath Found 4 tests for numpy.core.scalarmath Found 9 tests for numpy.lib.arraysetops Found 42 tests for numpy.lib.type_check Found 185 tests for numpy.core.multiarray Found 3 tests for numpy.fft.helper Found 36 tests for numpy.core.ma Found 12 tests for numpy.lib.twodim_base Found 10 tests for numpy.core.defmatrix Found 1 tests for numpy.lib.ufunclike Found 4 tests for numpy.ctypeslib Found 41 tests for numpy.lib.function_base Found 2 tests for numpy.lib.polynomial Found 9 tests for numpy.core.records Found 26 tests for numpy.core.numeric Found 4 tests for numpy.lib.index_tricks Found 47 tests for numpy.lib.shape_base Found 0 tests for __main__ .......................................................................................................................................................................................................................................................................................................................................................................Warning: divide by zero encountered in arcsin Warning: divide by zero encountered in arcsin ................................................................................................................................................................ ---------------------------------------------------------------------- Ran 519 tests in 1.031s OK <unittest.TextTestRunner object at 0x149db90> >>> import scipy >>> scipy.test(10) Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack.umfpack' from '...y/linsolve/umfpack/umfpack.pyc'> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/tests/test_umfpack.py:17: AttributeError: 'module' object has no attribute 'umfpack' (in ?) Found 4 tests for scipy.io.array_import Found 1 tests for scipy.cluster.vq Found 128 tests for scipy.linalg.fblas Found 397 tests for scipy.ndimage Found 10 tests for scipy.integrate.quadpack Found 98 tests for scipy.stats.stats Found 54 tests for scipy.linalg.decomp Found 3 tests for scipy.integrate.quadrature Found 95 tests for scipy.sparse.sparse Found 24 tests for scipy.fftpack.pseudo_diffs Found 6 tests for scipy.optimize.optimize Found 6 tests for scipy.interpolate.fitpack Found 6 tests for scipy.interpolate Found 70 tests for scipy.stats.distributions Found 12 tests for scipy.io.mmio Found 10 tests for scipy.stats.morestats Found 4 tests for scipy.linalg.lapack Found 23 tests for scipy.fftpack.basic Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack' from '.../linsolve/umfpack/__init__.pyc'> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linsolve/umfpack/tests/test_umfpack.py:17: AttributeError: 'module' object has no attribute 'umfpack' (in ?) Found 5 tests for scipy.optimize.zeros Found 28 tests for scipy.io.mio Found 44 tests for scipy.linalg.basic Found 2 tests for scipy.maxentropy.maxentropy Found 358 tests for scipy.special.basic Found 128 tests for scipy.lib.blas.fblas Found 7 tests for scipy.linalg.matfuncs **************************************************************** WARNING: clapack module is empty ----------- See scipy/INSTALL.txt for troubleshooting. Notes: * If atlas library is not found by numpy/distutils/system_info.py, then scipy uses flapack instead of clapack. **************************************************************** Found 42 tests for scipy.lib.lapack Found 1 tests for scipy.optimize.cobyla Found 16 tests for scipy.lib.blas Found 1 tests for scipy.integrate Found 14 tests for scipy.linalg.blas Found 4 tests for scipy.fftpack.helper Found 4 tests for scipy.signal.signaltools Found 0 tests for __main__ Don't worry about a warning regarding the number of bytes read. Warning: 1000000 bytes requested, 20 bytes read. ........caxpy:n=4 ..caxpy:n=3 ....ccopy:n=4 ..ccopy:n=3 .............cscal:n=4 ....cswap:n=4 ..cswap:n=3 .....daxpy:n=4 ..daxpy:n=3 ....dcopy:n=4 ..dcopy:n=3 .............dscal:n=4 ....dswap:n=4 ..dswap:n=3 .....saxpy:n=4 ..saxpy:n=3 ....scopy:n=4 ..scopy:n=3 .............sscal:n=4 ....sswap:n=4 ..sswap:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ....zcopy:n=4 ..zcopy:n=3 .............zscal:n=4 ....zswap:n=4 ..zswap:n=3 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. Finding matrix eigenvalues ================================== | contiguous ---------------------------------------------- size | scipy 20 | 0.10 (secs for 150 calls) 100 | 0.13 (secs for 7 calls) 200 | 0.22 (secs for 2 calls) ....................................Took 13 points. ...........Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. ........................Use minimum degree ordering on A'+A. ...................Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. .................Resizing... 16 17 24 Resizing... 20 7 35 Resizing... 23 7 47 Resizing... 24 25 58 Resizing... 28 7 68 Resizing... 28 27 73 .....Use minimum degree ordering on A'+A. ............ Differentiation of periodic functions ===================================== size | convolve | naive ------------------------------------- 100 | 0.03 | 0.24 (secs for 1500 calls) 1000 | 0.02 | 0.33 (secs for 300 calls) 256 | 0.06 | 0.29 (secs for 1500 calls) 512 | 0.05 | 0.26 (secs for 1000 calls) 1024 | 0.05 | 0.50 (secs for 500 calls) 2048 | 0.04 | 0.38 (secs for 200 calls) 4096 | 0.04 | 0.31 (secs for 100 calls) 8192 | 0.05 | 0.30 (secs for 50 calls) .......... Hilbert transform of periodic functions ========================================= size | optimized | naive ----------------------------------------- 100 | 0.04 | 0.19 (secs for 1500 calls) 1000 | 0.02 | 0.24 (secs for 300 calls) 256 | 0.05 | 0.22 (secs for 1500 calls) 512 | 0.05 | 0.18 (secs for 1000 calls) 1024 | 0.05 | 0.35 (secs for 500 calls) 2048 | 0.05 | 0.30 (secs for 200 calls) 4096 | 0.05 | 0.25 (secs for 100 calls) 8192 | 0.05 | 0.23 (secs for 50 calls) ........ Shifting periodic functions ============================== size | optimized | naive ------------------------------ 100 | 0.04 | 0.24 (secs for 1500 calls) 1000 | 0.02 | 0.35 (secs for 300 calls) 256 | 0.05 | 0.31 (secs for 1500 calls) 512 | 0.05 | 0.29 (secs for 1000 calls) 1024 | 0.05 | 0.53 (secs for 500 calls) 2048 | 0.04 | 0.40 (secs for 200 calls) 4096 | 0.05 | 0.33 (secs for 100 calls) 8192 | 0.04 | 0.32 (secs for 50 calls) .. Tilbert transform of periodic functions ========================================= size | optimized | naive ----------------------------------------- 100 | 0.04 | 0.26 (secs for 1500 calls) 1000 | 0.02 | 0.26 (secs for 300 calls) 256 | 0.04 | 0.31 (secs for 1500 calls) 512 | 0.05 | 0.27 (secs for 1000 calls) 1024 | 0.04 | 0.41 (secs for 500 calls) 2048 | 0.05 | 0.38 (secs for 200 calls) 4096 | 0.04 | 0.30 (secs for 100 calls) 8192 | 0.05 | 0.28 (secs for 50 calls) ........../Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:457: UserWarning: The coefficients of the spline returned have been computed as the minimal norm least-squares solution of a (numerically) rank deficient system (deficiency=7). If deficiency is large, the results may be inaccurate. Deficiency may strongly depend on the value of eps. warnings.warn(message) ................................................................................................Ties preclude use of exact statistic. ..Ties preclude use of exact statistic. ........ **************************************************************** WARNING: clapack module is empty ----------- See scipy/INSTALL.txt for troubleshooting. Notes: * If atlas library is not found by numpy/distutils/system_info.py, then scipy uses flapack instead of clapack. **************************************************************** .. Fast Fourier Transform ================================================= | real input | complex input ------------------------------------------------- size | scipy | numpy | scipy | numpy ------------------------------------------------- 100 | 0.18 | 0.14 | 0.11 | 0.11 (secs for 7000 calls) 1000 | 0.36 | 0.45 | 0.40 | 0.29 (secs for 2000 calls) 256 | 0.35 | 0.28 | 0.23 | 0.23 (secs for 10000 calls) 512 | 0.38 | 0.53 | 0.40 | 0.46 (secs for 10000 calls) 1024 | 0.19 | 0.21 | 0.13 | 0.14 (secs for 1000 calls) 2048 | 0.37 | 0.42 | 0.23 | 0.27 (secs for 1000 calls) 4096 | 0.28 | 0.36 | 0.19 | 0.27 (secs for 500 calls) 8192 | 0.53 | 0.78 | 0.42 | 0.59 (secs for 500 calls) .... Multi-dimensional Fast Fourier Transform =================================================== | real input | complex input --------------------------------------------------- size | scipy | numpy | scipy | numpy --------------------------------------------------- 100x100 | 0.12 | 0.16 | 0.11 | 0.15 (secs for 100 calls) 1000x100 | 0.12 | 0.14 | 0.12 | 0.14 (secs for 7 calls) 256x256 | 0.10 | 0.13 | 0.10 | 0.12 (secs for 10 calls) 512x512 | 0.17 | 0.20 | 0.18 | 0.19 (secs for 3 calls) ..... Inverse Fast Fourier Transform =============================================== | real input | complex input ----------------------------------------------- size | scipy | numpy | scipy | numpy ----------------------------------------------- 100 | 0.18 | 0.30 | 0.13 | 0.27 (secs for 7000 calls) 1000 | 0.35 | 0.76 | 0.47 | 0.68 (secs for 2000 calls) 256 | 0.35 | 0.53 | 0.26 | 0.46 (secs for 10000 calls) 512 | 0.40 | 0.77 | 0.41 | 0.70 (secs for 10000 calls) 1024 | 0.19 | 0.36 | 0.13 | 0.29 (secs for 1000 calls) 2048 | 0.39 | 2.57 | 0.23 | 0.50 (secs for 1000 calls) 4096 | 0.33 | 0.55 | 0.21 | 0.43 (secs for 500 calls) 8192 | 0.55 | 1.09 | 0.45 | 0.92 (secs for 500 calls) ....... Inverse Fast Fourier Transform (real data) ================================== size | scipy | numpy ---------------------------------- 100 | 0.16 | 0.31 (secs for 7000 calls) 1000 | 0.14 | 0.31 (secs for 2000 calls) 256 | 0.30 | 0.49 (secs for 10000 calls) 512 | 0.39 | 0.63 (secs for 10000 calls) 1024 | 0.06 | 0.14 (secs for 1000 calls) 2048 | 0.22 | 0.41 (secs for 1000 calls) 4096 | 0.14 | 0.31 (secs for 500 calls) 8192 | 0.31 | 0.56 (secs for 500 calls) .... Fast Fourier Transform (real data) ================================== size | scipy | numpy ---------------------------------- 100 | 0.16 | 0.13 (secs for 7000 calls) 1000 | 0.11 | 0.11 (secs for 2000 calls) 256 | 0.31 | 0.23 (secs for 10000 calls) 512 | 0.31 | 0.33 (secs for 10000 calls) 1024 | 0.06 | 0.06 (secs for 1000 calls) 2048 | 0.19 | 0.21 (secs for 1000 calls) 4096 | 0.14 | 0.18 (secs for 500 calls) 8192 | 0.27 | 0.35 (secs for 500 calls) ... f2 is a symmetric parabola, x**2 - 1 f3 is a quartic polynomial with large hump in interval f4 is step function with a discontinuity at 1 f5 is a hyperbola with vertical asymptote at 1 f6 has random values positive to left of 1, negative to right of course these are not real problems. They just test how the 'good' solvers behave in bad circumstances where bisection is really the best. A good solver should not be much worse than bisection in such circumstance, while being faster for smooth monotone sorts of functions. TESTING SPEED times in seconds for 2000 iterations function f2 cc.bisect : 0.400 cc.ridder : 0.030 cc.brenth : 0.030 cc.brentq : 0.030 function f3 cc.bisect : 0.100 cc.ridder : 0.030 cc.brenth : 0.040 cc.brentq : 0.040 function f4 cc.bisect : 0.080 cc.ridder : 0.110 cc.brenth : 0.090 cc.brentq : 0.100 function f5 cc.bisect : 0.080 cc.ridder : 0.120 cc.brenth : 0.100 cc.brentq : 0.110 function f6 cc.bisect : 0.090 cc.ridder : 0.100 cc.brenth : 0.100 cc.brentq : 0.100 ................................. Finding matrix determinant ================================== | contiguous | non-contiguous ---------------------------------------------- size | scipy | basic | scipy | basic 20 | 0.20 | 0.28 | 0.21 | 0.24 (secs for 2000 calls) 100 | 0.38 | 0.37 | 0.41 | 0.43 (secs for 300 calls) 500 | 0.24 | 0.24 | 0.27 | 0.28 (secs for 4 calls) ...... Finding matrix inverse ================================== | contiguous | non-contiguous ---------------------------------------------- size | scipy | basic | scipy | basic 20 | 0.35 | 0.33 | 0.33 | 0.34 (secs for 2000 calls) 100 | 0.90 | 1.42 | 0.91 | 1.48 (secs for 300 calls) 500 | 0.64 | 1.26 | 0.69 | 0.84 (secs for 4 calls) ................. Solving system of linear equations ================================== | contiguous | non-contiguous ---------------------------------------------- size | scipy | basic | scipy | basic 20 | 0.32 | 0.18 | 0.32 | 0.19 (secs for 2000 calls) 100 | 0.41 | 0.37 | 0.42 | 0.42 (secs for 300 calls) 500 | 0.26 | 0.25 | 0.28 | 0.25 (secs for 4 calls) ................................................................................................................................................................................................................................................................................................................................................................................................caxpy:n=4 ..caxpy:n=3 ....ccopy:n=4 ..ccopy:n=3 .............cscal:n=4 ....cswap:n=4 ..cswap:n=3 .....daxpy:n=4 ..daxpy:n=3 ....dcopy:n=4 ..dcopy:n=3 .............dscal:n=4 ....dswap:n=4 ..dswap:n=3 .....saxpy:n=4 ..saxpy:n=3 ....scopy:n=4 ..scopy:n=3 .............sscal:n=4 ....sswap:n=4 ..sswap:n=3 .....zaxpy:n=4 ..zaxpy:n=3 ....zcopy:n=4 ..zcopy:n=3 .............zscal:n=4 ....zswap:n=4 ..zswap:n=3 ...Result may be inaccurate, approximate err = 2.66420674161e-08 ...Result may be inaccurate, approximate err = 7.27595761418e-12 ......................................................F.......Residual: 1.05006950433e-07 . **************************************************************** WARNING: cblas module is empty ----------- See scipy/INSTALL.txt for troubleshooting. Notes: * If atlas library is not found by numpy/distutils/system_info.py, then scipy uses fblas instead of cblas. **************************************************************** .......F.............. ====================================================================== FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/lib/blas/tests/test_blas.py", line 76, in check_dot assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/testing/utils.py", line 156, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: 3.2499254780407681e-37j DESIRED: (-9+2j) ====================================================================== FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/linalg/tests/test_blas.py", line 75, in check_dot assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/testing/utils.py", line 156, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: 3.2499218907166995e-37j DESIRED: (-9+2j) ---------------------------------------------------------------------- Ran 1605 tests in 81.361s FAILED (failures=2) <unittest.TextTestRunner object at 0x2fb0f30> >>> |