[C++-sig] PyArg_ParseTuple() failed in parsing args

Qinfeng(Javen) Shi shiqinfeng at gmail.com
Wed Sep 27 08:47:42 CEST 2006


Dear all,

According the knowledge from http://numpy.scipy.org/numpydoc/numpy-13.html
It seems when input args is numpy.ndarray, it uses
PyArg_ParseTuple(args, "O!", &PyArray_Type, &array)) to convert PyObject*
args into PyArrayObject* array. Then we can handle the array in c extension.
But this PyArg_ParseTuple( ) failed(not crashed) when I used it in python
environment(even when I put a real tuple into args).

I have #define PY_ARRAY_UNIQUE_SYMBOL  Javen
and  import_array();
and even #include "ufuncobject.h";

Is that possible to make it work? I guess I missed some subtle thing.

Thanks!


-- 
Qinfeng(Javen) Shi

Research School of Information Sciences and Engineering
Australian National University
Locked Bag 8001
Canberra ACT 2601
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060927/ce28ab57/attachment.htm>


More information about the Cplusplus-sig mailing list