Allow multi-dimensional constraints
Multi-dimensional constraints (allowed by scipy) produce an assertion error on assert len(names) == num, as the handling of constraints seems to have been designed around unidimensional constraints only. It's not super critical, as one can separate the constraints, but this makes it less efficient and clean (e.g. some computed quantity might be common across various constraints) and it is something that does not seem to be documented.
Reported by Francisco Huhn.