[Numpy-discussion] numpy test failure: "ctypes is not available"

Francesc Altet faltet at carabos.com
Fri Sep 8 10:41:21 EDT 2006


A Divendres 08 Setembre 2006 15:20, listservs at mac.com va escriure:
> I have built and installed numpy from svn on an Intel mac, and am
> having test failures that do not occur on PPC:
>
> In [8]: numpy.test()
>    Found 13 tests for numpy.core.umath
>    Found 8 tests for numpy.lib.arraysetops
>    Found 3 tests for numpy.fft.helper
>    Found 1 tests for numpy.lib.ufunclike
>    Found 4 tests for numpy.ctypeslib
>    Found 1 tests for numpy.lib.polynomial
>    Found 8 tests for numpy.core.records
>    Found 26 tests for numpy.core.numeric
>    Found 3 tests for numpy.lib.getlimits
>    Found 31 tests for numpy.core.numerictypes
>    Found 4 tests for numpy.core.scalarmath
>    Found 10 tests for numpy.lib.twodim_base
>    Found 46 tests for numpy.lib.shape_base
>    Found 4 tests for numpy.lib.index_tricks
>    Found 32 tests for numpy.linalg.linalg
>    Found 5 tests for numpy.distutils.misc_util
>    Found 42 tests for numpy.lib.type_check
>    Found 163 tests for numpy.core.multiarray
>    Found 36 tests for numpy.core.ma
>    Found 10 tests for numpy.core.defmatrix
>    Found 39 tests for numpy.lib.function_base
>    Found 0 tests for __main__
> .........................EEEE...........................................
> ........................................................................
> ........................................................................
> ........................................................................
> ........................................................................
> ........................................................................
> .........................................................
> ======================================================================
> ERROR: check_dtype (numpy.tests.test_ctypeslib.test_ndpointer)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/numpy/tests/test_ctypeslib.py", line 10, in
> check_dtype
>      p = ndpointer(dtype=dt)
>    File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/numpy/ctypeslib.py", line 15, in _dummy
>      raise ImportError, "ctypes is not available."
> ImportError: ctypes is not available.

This may be due to the fact that you are using Python 2.4 here and ctypes 
comes with Python2.5. Switch to 2.5, install ctypes separately or feel free 
to ignore this.

I suppose that a check has to be set up in the tests to avoid ctypes ones to 
be checked in case ctypes is not available.

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"




More information about the NumPy-Discussion mailing list