Hi!
I'm new to Julia and am trying to figure out the syntax for calling static
methods in via PyCall. The following works fine in Python:
import casadi as c
x = c.MX.sym("x",2,2)
c.gradient(c.det(x),x)
% Out[8]: MX((det(x)*inv(x)'))
I'm trying to do the same in Julia via PyCall, but it fails on the second
line:
@pyimport casadi as c
x = c.MX.sym("x",2,2) % ERROR: type Function has no field sym
I also tried other replacing the ".sym" part, but that doesn't work either:
@pyimport casadi as c
x = c.MX[:sym]("x",2,2) % ERROR: no method getindex(Function,Symbol)
The problem appears to be that "c.MX" is a function and not a "PyObject"
type in Julia. In Python it's a class of course:
c.MX % fn (generic function with 1 method)
What am I doing wrong?
Joel