Open mdarnold1 opened 3 years ago
Oh, great! Could you submit a pull request to the PyMultiNest repository?
Now that I look at this more carefully I can see that ngiven*ldxgiven values should be passed in, but the wrapper defines ngiven as len(xgiven) and the wrapper documentation describes xgiven as a list of points. I suppose that would imply each point in xgiven is itself an array, which I think is more complicated to flatten into a c array. Do you think it would be better to go with a flat list?
Either way when it is implemented the documentation should be clarified.
The documentation is taken from cuba, so it should be followed. It seems a list of points is expected, so that should be what is passed. Probably it would make sense to allow passing numpy arrays or python lists, and the wrapper should convert them into 2d c arrays.
xgiven for Divonne can't be used (at least in recent versions of python) because the copy to ctypes fails.
I believe the fix is to change line 277 of init.py to: xgiven = (c_double ngiven)(xgiven)