I have the C++ method which resize boost::numeric::array:
void solve(const TReal start_t, const TReal end_t,
boost::python::numeric::array &result) {
...
result.resize(make_tuple(...));
...
}
and this method is called from Python:
some_object.solve(0, 10, solution)
where solution = numpy.ndarray([])
In C++ file (where Python module is defined) I use
numeric::array::set_module_and_type("numpy", "ndarray");
The program exits with the following message:
Traceback (most recent call last):
File ...
some_object.solve(0, 10, solution)
ValueError: cannot resize an array references or is referenced
by another array in this way. Use the resize function
How can I resize the boost::numeric::array?
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig