From fe046fa5a86c7312985831a1b4d44401ad6bc256 Mon Sep 17 00:00:00 2001 From: pytlab Date: Mon, 12 Feb 2018 09:36:06 +0800 Subject: [PATCH] Fix error in example code. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 207112c..4723e2b 100644 --- a/README.rst +++ b/README.rst @@ -122,9 +122,9 @@ or if you want to minimize it, you can add a minimization decorator on it class ConsoleOutput(OnTheFlyAnalysis): master_only = True interval = 1 - def register_step(self, ng, population, engine): + def register_step(self, g, population, engine): best_indv = population.best_indv(engine.fitness) - msg = 'Generation: {}, best fitness: {:.3f}'.format(ng, engine.fmax) + msg = 'Generation: {}, best fitness: {:.3f}'.format(g, engine.fmax) engine.logger.info(msg) 7. Run