[C++-sig] more examples of automatic type conversion

Neal Becker ndbecker2 at gmail.com
Wed May 2 19:06:05 CEST 2007


Eric Jonas wrote:

> Hello! I'm using boost::python to try and interface numpy (that is, the
> newest numpy, not numeric or numarray) ndarray objects to my code which
> depends on boost::multi_array. I've written functions that take a
> pyobject* and return a multiarray and vice versa. Now I'm at the point
> of interfacing my c++ classes (which take multi_array references in
> their constructors). Rather than adulterating their interfaces by adding
> additional constructors with PyObject* arguments, is there some way of
> telling boost::python to use my conversion functions automatically?
> 
> Thanks,
> ...Eric Jonas

I'm very interested in interfacing various c++ array containers to numpy. 
Do you have any small examples?




More information about the Cplusplus-sig mailing list