[C++-sig] How to export arrays from C(++) to python using boost

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Feb 9 14:59:50 CET 2004

--- "Shukla, Nitin (Export)" <nitin.shukla at pw.utc.com> wrote:
> I am working on an application where an array of ints and floats are to 
> exported from C++ to Python using boost::python. 
> As I am newbie to boost python, I couldn't find any documentation or 
> working example that satisfies the above requirement. Can someone help 
> me out??

Wrapping arrays is possible in several different ways. There isn't "the one"
universal solution. Here are some links to get you started:

To learn about the choice of creating a new Python types for your arrays vs.
converting to and from regular Python tuples:


How to use the "indexing suite" that comes with Boost.Python (1.31.0 release):


Some nice general examples that predate the indexing suite:


Raoul Gough is working on a new implementation of the indexing suite. Look in
the archieve of this list to learn more about his efforts.


Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.

More information about the Cplusplus-sig mailing list