[Numpy-discussion] Compilation problems - bizzare

Thomas Hrabe thrabe at burnham.org
Mon May 5 19:33:39 EDT 2008


Hi all,

currently, I am writing a box of modular functions for exchanging python & matlab objects (nd arrays in particular).
I am facing an odd problem which I can not explain to myself:

I use 
PyArg_ParseTuple(args, "O!s",&PyArray_Type, &array,&na)
for parsing the array and a string.
This function call works perfectly well when called from a static function used for extending python. 
However, using the call above in another function encapsulating the call above yields a segmentation fault -> python crash -> anger , irritation ... : )
Same with 
PyArray_FromDimsAndData(dimensions,size,(const char)p.first,(char*)value)

Did somebody ever encounter this?

By the way, I get a compilation warning 
/home/global/python32/lib/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:944: warning: 'int _import_array()' defined but not used

Thank you in advance for your help,
Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080505/e16b1d3b/attachment.html>


More information about the NumPy-Discussion mailing list