![]() | gridloop1_C calls a function like
double somefunc(double x, double y)but our function is a Python object... |
![]() | Trick: store the Python function in
PyObject* _pyfunc_ptr; /* global variable */and make a ``wrapper'' for the call: double _pycall(double x, double y) { /* perform call to Python function object in _pyfunc_ptr */ } |