[C++-sig] Re: blitz++ and numarray

Jonathan Brandmeyer jbrandmeyer at earthlink.net
Wed Apr 7 04:00:27 CEST 2004


On Tue, 2004-04-06 at 20:49, Faheem Mitha wrote:
> On Tue, 30 Mar 2004 07:25:18 +0200, Xavier WARIN(Compte LOCAL) - I23
> <xavier.warin at der.edfgdf.fr> wrote:
> 
> > Hi
> >
> > Don't do it by yourself.
> > You'd better use SWIG  to do the wrapping, or better Boost 
> > (www.boost.org). You can find a wrapping for Numeric at this adresse :
> > http://www.eos.ubc.ca/research/clouds/num_util.html.
> > (It is done with Boost)
> > You will be able to export all C++ classes  to Python,
> > and use tuple, dict inside your C++ code etc...
> 
> Thanks for your reply. The link you reference appears to be broken
> however. 

Works for me.

> I'm trying to read the Boost Python docs. Would it still be
> possible using this interface to work with blitz++ arrays in python?
> Also, how does Boost Python compare with Pycxx
> (http://cxx.sourceforge.net/)?

I recently ported a C++ extension module from Py::CXX to Boost.Python. 
CXX doesn't do half the things that Boost.Python does.  Basically, CXX
is a fairly thin wrapper around the C concrete and abstract object
APIs.  You have to perform all of the argument matching and function
overloading yourself, among other things.

I'm somewhat familiar with Blitz++, and you should be able to wrap it
using Boost.Python.  I have (experimentally) wrapped
boost::numeric::ublas::matrix classes, which are somewhat similar to
blitz::Matrix classes.

-Jonathan Brandmeyer







More information about the Cplusplus-sig mailing list