You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to follow the instructions on http://code.google.com/p/pyminuit/ using
Python3 (!!).
This worked.
However, when I tried to replace in function "f(x,y)" the variable name "x" by
"xx", I got the error:
m.migrad()
KeyError: 'Parameter "x" is missing from values'.
I worked out the problem:
in minuit_Minuit_init() self->upar is set like this:
self->upar->Add(Pystring_AsString(param)),
where "Pystring_AsString(x)" is replaced by "PyUnicode_AS_DATA(x)".
This however only returns a pointer to the first character of "param"
The problem is resolved by replacing the above with
PyObject * ascii_param=PyUnicode_AsASCIIString(param);
self->upar->Add(PyBytes_AsString(ascii_param),value,error);
Py_DECREF(ascii_param);
Original issue reported on code.google.com by [email protected] on 3 Jun 2013 at 9:19
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 3 Jun 2013 at 9:19The text was updated successfully, but these errors were encountered: