Parcourir la source

use of global variable

Jérôme BUISINE il y a 4 ans
Parent
commit
021313873e
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      find_best_attributes.py

+ 1 - 0
find_best_attributes.py

@@ -148,6 +148,7 @@ def main():
 
 
     # init solution (`n` attributes)
     # init solution (`n` attributes)
     def init():
     def init():
+        global number_of_values
         return BinarySolution([], number_of_values).random(validator)
         return BinarySolution([], number_of_values).random(validator)
 
 
     if not os.path.exists(cfg.output_backup_folder):
     if not os.path.exists(cfg.output_backup_folder):