The problem is that @pyimport is deciding that c.MX is a function (the 
constructor for the MX type), and is auto-converting it as such.  (Once 
Julia supports overloading of ".", I'll be able to define a type instead, 
to give access to both the constructor and the static members using a 
natural Python-like syntax.)

For now, the easiest thing to do is just to use c.pymember to access the 
raw PyObject.  Something like:


@pyimport casadi as c
MX = c.pymember("MX")
x = MX[:sym]("x",2,2)

Reply via email to