[Numpy-discussion] Numpy and C++ integration...

Barry Wark barrywark@gmail....
Mon Feb 4 16:23:58 CST 2008

For comparison of ctypes and SWIG wrappers of a simple C++ codebase,
feel free to take a look at the code for scikits.ann
(http://scipy.org/scipy/scikits/wiki/AnnWrapper). The original wrapper
was written using SWIG and the numpy typemaps. Rob Hetland has coded
an almost-the-same API wrapper using ctypes which is linked from the
above wiki page. Perhaps it will help the OP to see a similar project


On Feb 4, 2008 1:11 PM, Gael Varoquaux <gael.varoquaux@normalesup.org> wrote:
> On Mon, Feb 04, 2008 at 12:49:58PM -0800, Lou Pecora wrote:
> > So, for those looking for speed up through some
> > external C or C++ code, I would say (trying to be fair
> > here), try what Chris recommends below, if you want,
> > but IMHO, none of it is trivial.  If you get it to
> > work, great.  If not, you have the fall back of the C
> > API.
> Honestly, I found ctypes trivial, using
> http://www.scipy.org/Cookbook/Ctypes as a reference, and simply copying
> the code. I started by copying the code, made sure it worked, and I
> understood how to modify it, than adapted it to my problem.
> Gaël
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion

More information about the Numpy-discussion mailing list