
8 Jul
2006
8 Jul
'06
10:21 p.m.
Sebastien Fortier wrote:
I've tried what you have suggested but it does not work, here is the error [...] class_<boost::multi_array<double, 2> >("multi_array_2d"); class_<boost::const_multi_array_ref<double, 2>
("const_multi_array_ref_2d"); implicitly_convertible<boost::multi_array<double, 2>, boost::multi_array_ref<double, 2> >(); implicitly_convertible<boost::multi_array<double, 2>, boost::const_multi_array_ref<double, 2> >(); }
multi_array_ref<> isn't default constructible. You need to let Boost.Python know that: class_<boost::const_multi_array_ref<double, 2> > >( "const_multi_array_ref_2d", no_init ); class_<boost::multi_array_ref<double, 2> > >( "multi_array_ref_2d", no_init ); -- Daniel Wallin