Commit e4aeef24 authored by Jorn Baayen's avatar Jorn Baayen

nullvertcat: Create a DM if an empty list is passed, rather than an MX, so...

nullvertcat:  Create a DM if an empty list is passed, rather than an MX, so that external functions are not
called with dummy (and unresolved) MX.
parent eeacadd0
......@@ -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 0
return ca.DM(0, 1)
else:
return ca.vertcat(*L)
......
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