Boost logo

Boost Users :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2006-06-28 11:21:45


Sebastien Fortier wrote:
> I'm having some problems with the use of multi_array's with python. What
> I'm trying to do is to export some functions that create multi_array's
> and pass these multi_array's to other functions that will extract other
> array's from them and display them.
[...]
> So you see I can't use my code, what am I doing wrong?

You didn't export multi_array<double, 2> to Python. If you just want to
pass the multi_array's around without manipulating them, it's enough to
export it without any functions:

  class_<multi_array<double, 2> >("multi_array_2d");

If you want a more complete binding, there's binding code for
boost::multi_array queued for inclusion on the CVS. It's currently on a
branch:

Header:
  http://tinyurl.com/hm7pa

Test:
  http://tinyurl.com/z7fzn
  http://tinyurl.com/hthg2

HTH,

-- 
Daniel Wallin

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net