[C++-sig] wrapping 2D arrays with boost::python

Hans Meine hans_meine at gmx.net
Thu Oct 5 00:19:30 CEST 2006


On Wednesday 04 October 2006 20:30, Marko Skace wrote:
> I want to wrap this code such that __getitem__ and
> __setitem__ will work:
>
> array[2][3] = 1.0;

/me finds "array[2,3] = 1.0;" much more natural...

(easy to do with __getitem__(tuple) )

Have fun,
  Hans



More information about the Cplusplus-sig mailing list