-
Notifications
You must be signed in to change notification settings - Fork 115
Description
In the Cosmology class, we currently use scipy to do the requisite integration for the Da calculation. Since we have an integrator in c++, it would be nice if we could just use that from python and remove our scipy dependency.
I think this should be relatively easy now that I found this StackOverflow post:
(From what they wrote there, I think I know how to do it without using the c++11 lambda feature.)
What I'm planning to do is to write a c++ function that takes in a python function (via boost::python::object) and the bounds of the integration and perform the integral. I can then wrap this function so it's callable from python. This will require having a c++ function object that the integrator can use, which just wraps the python object and farms out the function calls to it.
@TallJimbo Jim, do you see any stumbling blocks with this approach before I dive in?