Question

I have about 20 simple C++ classes that represent various probability distributions. I would like to make these available in Python. What is the easiest way to do this? I don't mind having a program automatically generate wrappers, but I don't want to retype the classes.

Also, some of my classes use Boost uBLAS libraries. Is there a way to automatically pass in numpy arrays from Python?

Was it helpful?

Solution

Actually, none of those.

I use Boost.Python extensively to operate a C++ library from Python.

There are easy converters for uBlas and NumPy, if you don't mind copying values around. If you do, you can try to get PyUblas to work, which enables memory sharing between NumPy and uBlas.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top