I have C code similar to the following:
float image_data[IMAGE_SIZE];
const float *get_data()
get_data returns a pointer to image_data. I'd like to expose get_data to
python and have it return a copy of the array in some Python type. (it is
actually a 2D array of image data)
In the wrapper code, I tried something like:
numeric::array py_get_data()
{
return numeric::array(get_data());
}
With
.def("get_data", &wrap::py_get_data)
But I get this error:
TypeError: No to_python (by-value) converter found for C++ type: float
I thought I had done this in the past but I must be missing something. Any
help would be much appreciated.
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig