I'm currently working on a numerical project that uses boost.python, and
since we already had boost as a dependency we've begun using
boost/multi_array_ref to simplify multi-dimensional array handling in
our code. I was rather surprised when the following code fragment spit
out pages of errors when I tried to compile it:
float* data = (float*) malloc(nx*ny*sizeof(float));
[...]
boost::multi_array_ref
xy(data, boost::extents[nx][ny]);
xy = 0.; // errors out here
Looking through the docs I realized that operator= isn't even mentioned,
so perhaps I shouldn't have been surprised. It is rather unfortunate,
though, that such a statement isn't allowed. (Unless, of course, I'm
doing something wrong, which is completely possible.) Is there any
plan to add such functionality in the future, or would it make more
sense for us to switch to a different library (blitz++ or something
similar)?
Thanks,
Grant Goodyear
--
Grant Goodyear
web: http://www.grantgoodyear.org
e-mail: grant@grantgoodyear.org