Hi everybody,
I have a python function fun_py(x, y, z) built in a way similar to this
def fun_py(x,y,z):
value1 = 1.0
value2 = 2.0
if x[0] > value2:
out = x+y+z
elif x[0] > value1:
out = y+z
else:
out = z
return out
I want now to build a Function
fun_cs = Function('fun_cs', [x,y,z], [fun_py]).
When I run this command, I have this error: TypeError - cannot compute truth value of casadi ex-elem symbolic expression.
Do you know if there is a way to compute this?
Best regards,
Marco