diff --git a/deap/base.py b/deap/base.py index ce36c8ef9..0d2a30e05 100644 --- a/deap/base.py +++ b/deap/base.py @@ -185,7 +185,7 @@ def getValues(self): return tuple(map(truediv, self.wvalues, self.weights)) def setValues(self, values): - assert len(values) == len(self.weights) + assert len(values) == len(self.weights), "Assigned values have not the same length than fitness weights" try: self.wvalues = tuple(map(mul, values, self.weights)) except TypeError: