[Numpy-discussion] swig numpy2carray converters
Wed Nov 21 11:32:19 CST 2007
Georg Holzmann wrote:
> As chris said, I need to make an example:
Ah, I see now:
/// @return internal big data without copying
void getBigData(double **mtx, int *rows, int *cols)
*rows = drows; *cols = dcols;
*mtx = very_big_data;
This is the one we've been talking about, correct?
So you need to pass a pointer to a pointer in, and it gets set to the
existing pointer -- thus no new data allocation.
It's going to take Bill to figure out how to extend numpy.i to cover
this case, but imagine it will be pretty straightforward.
Thanks for the examples.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
More information about the Numpy-discussion