[Numpy-discussion] A C++ library and the new array interface: the best approach?

Simon Burton simon at arrowtheory.com
Tue Jul 4 07:47:58 EDT 2006


On Mon, 03 Jul 2006 16:41:11 -0600
Fernando Perez <Fernando.Perez at colorado.edu> wrote:

> 
> So I'd like to know if SWIG is really the best way out in this particular case 
> (and any advice on taking advantage of the array interface via SWIG would be 
> appreciated), or if ctypes or pyrex could be used here.  I'm quite happy using 
> pyrex in other contexts, but I know it doesn't directly support C++.  However, 
> since I have access to all the code, perhaps a pure C layer could be used to 
> bridge the C++/pyrex gap.  Or given the recent praise for ctypes, perhaps that 
> can be an option?

Pyrex can handle some C++. Eg. make objects, and call methods.
You will need to search the pyrex email archives for all the tricks to
get this to work.

Simon.




More information about the NumPy-Discussion mailing list