GeneticAlgorithmPython
GeneticAlgorithmPython copied to clipboard
Resolving #283 user warning when delay_after_gen is not in use
I've made three small changes to remove the UserWarning without suppressing all warnings (#283 ).
- In the constructor, set the default value for
delay_after_gento None. - In the validation step, if the incoming argument is None, set
self.delay_after_gento None. - Before calling
time.sleep(self.delay_after_gen)just check whether it's None.
Although, the alternative, since it's being deprecated, is to remove all references to delay_after_gen. I'll be happy to do that if it's your preference, then I'll resubmit the PR.