I have a C function I want to use in Python:
extern int convertAtoB( stateStruct *myStruct,
const double PointA[3],
double PointB[3]);
Using SWIG, I think I need to define a typemap to convert the two points (PointA the input, PointB the output) so that Python can use it. There doesn't seem to be a typemap in typemaps.i that works with this, so I have to define one. I can't seem to find examples of this for arrays in the SWIG documentation.
I would like to use this library like so:
s = externalStruct()
point_a = [1, 2, 3]
result, point_b = convertAtoB(s, point_a)
print point_b
"expect [4, 5, 6]"
How would I do this? Thanks