I have been trying to figure out how to pass a fixed size array by reference using SWIG to python. Mostly I have been considering the numpy.i interface for this. However, I can't seem to find any reference to this online.
For regular array passing to numpy the way you do is it first the C++ function in foo.h:
void foo(double* array, int length);
And the relevant part of the SWIG file is:
%include "numpy.i"
%init %{
import_array();
%}
%apply (unsigned char* IN_ARRAY1, int DIM1) {(unsigned char* frame, int len)};
%include "foo.h"
The question is how do you perform this when the C++ function is:
void bar(double (&array)[3]);
void func(double arr[3])