| Issue 19: | User data not passed to Hessian callback |
‹ Prev
10 of 10
|
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. run test/example.py with user data argument given to solve()
2. try to access user_data in eval_h
What is the expected output? What do you see instead?
user_data in eval_h is always None, whereas in the other callbacks
it is the object passed as the second arg to solve().
I thought the problem was that line 589 of callback.c should read:
Py_BuildValue ("(OOOO0)", arrayx, lagrangex, objfactor, Py_False,
and not:
Py_BuildValue ("(OOOO)", arrayx, lagrangex, objfactor, Py_False,
but with this I get a segfault when passing user data to solve.
The problem can be circumvented using lambda functions.
Aug 13, 2014
Project Member
#1
xu.mathena
Status:
Fixed
|