Commit eeacadd0 authored by Jorn Baayen's avatar Jorn Baayen

Fix handling of models without parameters.

parent f819492f
......@@ -22,7 +22,7 @@ def nullvertcat(*L):
Like vertcat, but creates an MX with consistent dimensions even if L is empty.
"""
if len(L) == 0:
return ca.MX(0, 1)
return 0
else:
return ca.vertcat(*L)
......@@ -39,8 +39,11 @@ def reduce_matvec(e, v):
def substitute_in_external(expr, symbols, values):
f = ca.Function('f', symbols, expr)
return f.call(values, True, False)
if len(symbols) == 0:
return expr
else:
f = ca.Function('f', symbols, expr)
return f.call(values, True, False)
def interpolate(ts, xs, t, equidistant, mode=0):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment