[Numpy-discussion] A question about import in numpy and in place build

David Cournapeau david at ar.media.kyoto-u.ac.jp
Fri Mar 13 01:42:04 EDT 2009


Hi,

    While making sure in-place builds work, I got the following problem:

python setup.py build_ext -i
python -c "import numpy as np; np.test()"
-> many errors

The error are all import errors:

Traceback (most recent call last):
  File "/usr/media/src/dsp/numpy/git/numpy/tests/test_ctypeslib.py",
line 83, in test_shape
    self.assert_(p.from_param(np.array([[1,2]])))
  File "numpy/ctypeslib.py", line 150, in from_param
    return obj.ctypes
  File "numpy/core/__init__.py", line 27, in <module>
    __all__ += numeric.__all__
NameError: name 'numeric' is not defined

Now, in the numpy/core/__init__.py, there are some "from numeric import
*" lines, but no "import numeric". So indeed numeric is not defined. But
why does this work for 'normal' numpy builds ? I want to be sure I don't
introduce some subtle issues before fixing the problem the obvious way,

cheers,

David



More information about the NumPy-Discussion mailing list