[C++-sig] more examples of automatic type conversion
Roman Yakovenko
roman.yakovenko at gmail.com
Wed May 2 15:32:21 CEST 2007
On 5/2/07, Eric Jonas <jonas at mit.edu> 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?
http://www.language-binding.net/pyplusplus/troubleshooting_guide/automatic_conversion/automatic_conversion.html
Let me know if this helped you.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list