Hi, When forcing f2py to use newcore, that is, when changing #include "Numeric/arrayobject.h" to #include "scipy/arrayobject.h" in newcore/scipy/f2py2e/src/fortranobject.h, then I get the folloing messages /tmp/tmpqynjjs/src/fortranobject.c: In function 'fortran_setattr': /tmp/tmpqynjjs/src/fortranobject.c:233: warning: implicit declaration of function '_PyArray_multiply_list' /tmp/tmpqynjjs/src/fortranobject.c: In function 'copy_ND_array': /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 2 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 3 of 'cast' makes integer from pointer without a cast /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 4 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 5 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 2 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 3 of 'cast' makes integer from pointer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 4 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 5 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 2 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 3 of 'cast' makes integer from pointer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 4 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 5 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c: At top level: /usr/local/include/python2.3/scipy/__multiarray_api.h:681: warning: 'import_array' defined but not used when compiling fortranobject.c and when trying to import the corresponding extension module, I get
import foo Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: ./foo.so: undefined symbol: _PyArray_multiply_list
So, we need to have a newcore replacement for _PyArray_multiply_list. Is there anything available already? Pearu
Pearu Peterson wrote:
Hi,
When forcing f2py to use newcore, that is, when changing
#include "Numeric/arrayobject.h"
to
#include "scipy/arrayobject.h"
in newcore/scipy/f2py2e/src/fortranobject.h, then I get the folloing messages
/tmp/tmpqynjjs/src/fortranobject.c: In function 'fortran_setattr': /tmp/tmpqynjjs/src/fortranobject.c:233: warning: implicit declaration of function '_PyArray_multiply_list' /tmp/tmpqynjjs/src/fortranobject.c: In function 'copy_ND_array': /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 2 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 3 of 'cast' makes integer from pointer without a cast /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 4 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:980: warning: passing argument 5 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 2 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 3 of 'cast' makes integer from pointer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 4 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1004: warning: passing argument 5 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 2 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 3 of 'cast' makes integer from pointer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 4 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c:1023: warning: passing argument 5 of 'cast' makes pointer from integer without a cast /tmp/tmpqynjjs/src/fortranobject.c: At top level: /usr/local/include/python2.3/scipy/__multiarray_api.h:681: warning: 'import_array' defined but not used
when compiling fortranobject.c and when trying to import the corresponding extension module, I get
import foo
Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: ./foo.so: undefined symbol: _PyArray_multiply_list
So, we need to have a newcore replacement for _PyArray_multiply_list. Is there anything available already?
Yes, PyArray_MultiplyList I should make a define. -Travis
Pearu Peterson wrote:
Hi,
When forcing f2py to use newcore, that is, when changing
#include "Numeric/arrayobject.h"
to
#include "scipy/arrayobject.h"
The copy_ND_array (in, out) function can be replaced with PyArray_CopyInto(destination, source) which does the right thing... -Travis
participants (2)
-
Pearu Peterson
-
Travis Oliphant