From 7890097856dd62d04a2e49478d57e627c471a7fb Mon Sep 17 00:00:00 2001 From: Anton Beloglazov Date: Tue, 22 Jan 2013 12:17:31 +1100 Subject: [PATCH] Fixed a bug in the OTF wrapper --- neat/locals/overload/otf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neat/locals/overload/otf.py b/neat/locals/overload/otf.py index b558e7e..44c433d 100644 --- a/neat/locals/overload/otf.py +++ b/neat/locals/overload/otf.py @@ -40,7 +40,7 @@ def otf_factory(time_step, migration_time, params): """ migration_time_normalized = float(migration_time) / time_step def otf_wrapper(utilization, state=None): - if state == None: + if state is None or state == {}: state = {'overload': 0, 'total': 0} return otf(params['otf'],