mzn: no unit arrays in output
@@ -288,6 +288,10 @@ class CPM_minizinc(SolverInterface):
expr_str = [self.convert_expression(e) for e in expr.flat]
else:
expr_str = [self.convert_expression(e) for e in expr]
+ if len(expr_str) == 1:
+ # unary special case, don't put in list
+ return expr_str[0]
+ else:
return "[{}]".format(",".join(expr_str))
if not isinstance(expr, Expression) or \
