[Numpy-discussion] scalarmath fails to build
Arnd Baecker
arnd.baecker at web.de
Tue May 2 23:51:04 EDT 2006
On Tue, 2 May 2006, Ted Horst wrote:
> Here is a patch:
>
>
> --- numpy/core/src/scalarmathmodule.c.src (revision 2471)
> +++ numpy/core/src/scalarmathmodule.c.src (working copy)
> @@ -597,7 +597,12 @@
> {
> PyObject *ret;
> @name@ arg1, arg2, out;
> +#if @cmplx@
> + @otyp@ out1;
> + out1.real = out.imag = 0;
> +#else
> @otyp@ out1=0;
> +#endif
> int retstatus;
> switch(_ at name@_convert2_to_ctypes(a, &arg1, b, &arg2)) {
Thanks - applied:
http://projects.scipy.org/scipy/numpy/changeset/2472
(Travis, I hope I got that right ;-)
After this numpy compiles for me, but on testing (64 Bit opteron) I get:
In [1]: import numpy
from lib import * -> failed: 'module' object has no attribute 'nmath'
import linalg -> failed: 'module' object has no attribute 'nmath'
In numpy/lib/__init__.py the construct
__all__ = ['nmath','math']
is used, but `nmath` is not mentioned explicitely before.
In [2]: numpy.__version__
Out[2]: '0.9.7.2471'
In [3]: numpy.test(10)
Found 5 tests for numpy.distutils.misc_util
Found 4 tests for numpy.lib.getlimits
Found 30 tests for numpy.core.numerictypes
Found 13 tests for numpy.core.umath
Found 8 tests for numpy.lib.arraysetops
Warning: FAILURE importing tests for <module 'numpy.lib.type_check' from
'...kages/numpy/lib/type_check.pyc'>
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/lib/tests/test_type_check.py:7:
AttributeError: 'modul
e' object has no attribute 'nmath' (in ?)
Found 93 tests for numpy.core.multiarray
Found 3 tests for numpy.dft.helper
Found 36 tests for numpy.core.ma
Found 2 tests for numpy.core.oldnumeric
Warning: FAILURE importing tests for <module 'numpy.lib.twodim_base' from
'...ages/numpy/lib/twodim_base.pyc'>
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/lib/tests/test_twodim_base.py:7:
ImportError: cannot i
mport name rot90 (in ?)
Found 8 tests for numpy.core.defmatrix
Found 1 tests for numpy.lib.ufunclike
Warning: FAILURE importing tests for <module 'numpy.lib.function_base'
from '...es/numpy/lib/function_base.pyc'>
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/lib/tests/test_function_base.py:7:
AttributeError: 'mo
dule' object has no attribute 'nmath' (in ?)
Found 1 tests for numpy.lib.polynomial
Found 6 tests for numpy.core.records
Found 19 tests for numpy.core.numeric
Warning: FAILURE importing tests for <module 'numpy.lib.index_tricks' from
'...ges/numpy/lib/index_tricks.pyc'>
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/lib/tests/test_index_tricks.py:4:
ImportError: cannot
import name r_ (in ?)
Warning: FAILURE importing tests for <module 'numpy.lib.shape_base' from
'...kages/numpy/lib/shape_base.pyc'>
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/lib/tests/test_shape_base.py:5:
AttributeError: 'modul
e' object has no attribute 'nmath' (in ?)
Found 0 tests for __main__
......................................................E............................................................................
...............................................................E...E..............................
======================================================================
ERROR: check_manyways (numpy.lib.tests.test_arraysetops.test_aso)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/lib/tests/test_arraysetops.py",
line 128, in c
heck_manyways
a = numpy.fix( nItem / 10 * numpy.random.random( nItem ) )
AttributeError: 'module' object has no attribute 'fix'
======================================================================
ERROR: check_basic (numpy.core.tests.test_defmatrix.test_algebra)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/core/tests/test_defmatrix.py",
line 115, in ch
eck_basic
import numpy.linalg as linalg
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/linalg/__init__.py",
line 4, in ?
from linalg import *
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/linalg/linalg.py",
line 19, in ?
from numpy.lib import *
AttributeError: 'module' object has no attribute 'nmath'
======================================================================
ERROR: check_basic (numpy.core.tests.test_defmatrix.test_properties)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/core/tests/test_defmatrix.py",
line 44, in che
ck_basic
import numpy.linalg as linalg
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/linalg/__init__.py",
line 4, in ?
from linalg import *
File
"/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/linalg/linalg.py",
line 19, in ?
from numpy.lib import *
AttributeError: 'module' object has no attribute 'nmath'
----------------------------------------------------------------------
Ran 229 tests in 0.440s
FAILED (errors=3)
Out[3]: <unittest.TextTestRunner object at 0x2aaaae02a9d0>
Best, Arnd
More information about the NumPy-Discussion
mailing list