Thanks for the responses - with further searching around this forum, I found the issue. As of Root 6.22 the types of the arguments in a TMinuit FCN function changed from TROOT types to python ctypes.
I am still having problems with this issue - calling a TMinuit function from within Python.
I can get this to work in a simple example, when the FCN is just defined as a standalone function in Python. But my actual code sets up the fit and the fit FCN inside a Python Class, and in that case I am still getting the
TypeError: int TMinuit::Migrad() =>TypeError: callable was deleted
error. I am hoping to find a solution that does not require me to rewrite a lot of my code, or change to do a different interface.
Attached I have two test scripts - testMigrad.py works fine, while testMigradC.py with the FCN in a class gives the error. I am running root 6.24.00 and python 3.8
Hi,
Also in C++ you cannot pass class member functions to TMinuit. You would need to use th MInimizer class where you can pass a functor object as function to be minimized.