Dear Tomas,
Ultimately, multiplication requires two MX objects.
Numeric numpy arrays will get automatically cast into MX when needed.
Object numpy arrays containing symbols will not be automatically cast.
You can use CasADi's vertcat/horzcat/blockcat here for Rot:
Rot = lambda theta : casadi.blockcat([
[casadi.cos(theta), -casadi.sin(theta)],
[casadi.sin(theta), casadi.cos(theta)],
])
Best regards,
Joris