I stumbled on a defect in the python interface. In code I had some definitions like n = 2/3 that I wanted to evaluate as floats, so I added 'from __future__ import division' as the first statement in the file. This introduces a problem when dividing casadi.SX objects shown by the following exception:
'TypeError: unsupported operand type(s) for /: 'SX' and 'SX'
Of course it's trivial to work around, but it caused me some consternation until I figured out the cause. Here is an example. Try with the first line executed or commented out.
from __future__ import division
x = casadi.SX('x')
y = casadi.SX('y')
x / y
Thank's for letting us know. I have added a ticket: https://sourceforge.net/apps/trac/casadi/ticket/401.
Fixed as of revision 3024
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.