> But another question: Do you want the C++ array to be copied in the numpy arrayIt may rather be this third case : the array will no more be accessed from C++,
> (safe, ARGOUT_ARRAY1 + a helper function should words), or the numpy array to
> point on the C++ array (hard to make it safe, only required is array is very
> big and can not be duplicated, ARGOUTVIEW_ARRAY1 should works) ?
and we just want the data to exists in the numpy array, which can be safely
destroy by Python. So the C++ function allocates the array with size not known
by the caller, and the caller is responsible to delete the array. If C++ is the
caller, a (double *array, int size) is returned, (and because there is two
returned values, there are returned using arguments, so actually double **array,
int *size), and if Python is the caller, (double *array, int size) is converted
to a numpy array by the typemap.