ffig
ffig copied to clipboard
Enable bindings of numpy arrays to C-arrays
No idea how difficult this would be ... :-)
We have C/C++ functions that interface with Python by wrapping C-arrays of doubles into Numpy arrays for return values as well as extracting the underlying C-array of a Numpy array for inputs.
This leads to a lot of boilerplate code in CPython. It would be great to be able to automatically bind C-arrays to Numpy arrays! :)
Do you need this for ctypes bindings or boost::python bindings?
Do you have some sample C++ API and Python API you’d like to generate from it?