Re: [Numpy-discussion] segv PyArray_Check

2013-11-14 Thread Burlen Loring
Hi David, Yes, that the situation. using your naming convention, in addtion to foo_wrap.c I have another file , say foo_convert.cxx, for massaging python data structures into our internal data structures. This source is compiled with a c++ compiler so that I can use templates to simplify handl

Re: [Numpy-discussion] segv PyArray_Check

2013-11-13 Thread David Froger
Hi Burlen, SWIG will generate a file named for example foo_wrap.c, which will contains a call to import_array() inserted by SWIG because of the %init %{ import_array(); %} in the SWIG script. So in the file foo_wrap.c (which will be compiled to a Python module _foo.so), you should be able to u

[Numpy-discussion] segv PyArray_Check

2013-11-13 Thread Burlen Loring
Hi, I'd like to add numpy support to an existing code that uses swig. I've changed the source file that has code to convert python lists into native data from c to c++ so I can use templates to handle data conversions. The problem I'm having is a segfault on PyArray_Check called from my c++ so