[SciPy-dev] C API

Nariman Habili n_habili at hotmail.com
Thu Nov 24 01:04:51 CST 2005


Hi there,

I would like to know how to extract a value (eg int) from a PyObject that 
contains an ndarray. I'm using boost.python to expose classes to Python. I'm 
passing an ndarray to C++ by reference. However, since boost.python hasn't 
been updated yet to scipy core, I'm using the C API.
I've tried PyArray_GETITEM, however it returns a PyObject, and I'm not sure 
how to extract an int or double etc from it. I need the C types so I can 
interface python with other parts of my code.

Would boost python be updated to scipy core soon?

Thanks for your help.





More information about the Scipy-dev mailing list