We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm cross posting an issue I have when using pyjulia with PATHSolver .
I can't pass over a lambda function (this appears to be a PATHSolver issue)
In [1]: import julia In [2]: j = julia.Julia() In [3]: j.sind(10) #works as planned Out[3]: 0.17364817766693036 In [8]: j.using("PATHSolver") In [9]: M = np.array([[0, 0, -1, -1], [0, 0, 1, -2], [1, -1, 2, -2], [1, 2, -2, 4]]) In [12]: q = np.array([2, 2, -2, -6]) In [13]: myf = lambda x: M*x + q In [14]: lb = np.zeros((4,)) In [15]: ub = 100*np.ones((4,)) In [16]: j.solveMCP(myf, lb, ub) RuntimeError: Julia exception: MethodError(PATHSolver.solveMCP,(PyObject <function <lambda> at 0x7f6a70eeb048>,[0.0,0.0,0.0,0.0],[100.0,100.0,100.0,100.0]))
Workaround doesn't work either (this appears to be a pyjulia issue?)
fwrap = j.eval('f -> (args...) -> f(args...)') In [20]: j.solveMCP(fwrap(myf), lb, ub) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-20-05aae9205059> in <module>() ----> 1 j.solveMCP(fwrap(myf), lb, ub) RuntimeError: Julia exception: MethodError(convert,(Float64,Dual(0.0,1.0,0.0,0.0,0.0)))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm cross posting an issue I have when using pyjulia with PATHSolver
.
I can't pass over a lambda function (this appears to be a PATHSolver issue)
Workaround doesn't work either (this appears to be a pyjulia issue?)
The text was updated successfully, but these errors were encountered: