[Numpy-discussion] SWIG typemap (numpy.i)

Giuseppe Di Guglielmo giuseppe at cs.columbia.edu
Tue Mar 26 15:02:06 EDT 2019

What is the right SWIG typemap for the following function?

void filter(int height, int width, unsigned int *input_array_2d, unsigned
int *input_array_2d);

The input and output arrays are bi-dimensional. The input array is
read-only and the output array is write-only. I tried something like:

%apply (int DIM1, int DIM2, int* INPLACE_ARRAY2) {(int height, int width,
int* input_array_2d), (int height, int width, int* input_array_2d)};

But it does not seem to be correct.

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20190326/090cb4da/attachment.html>

More information about the NumPy-Discussion mailing list