FFIG / ffig

Generate code to call C++ libraries from other languages
MIT License
29 stars 9 forks source link

Enable bindings of numpy arrays to C-arrays #446

Open erikarne opened 6 years ago

erikarne commented 6 years ago

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! :)

jbcoe commented 6 years ago

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?