Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedfgad committed Mar 27, 2024
1 parent 0734736 commit 2daae49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pygad/pygad.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,9 @@ def __init__(self,

# Validate delay_after_gen
if type(delay_after_gen) in GA.supported_int_float_types:
if not self.suppress_warnings:
warnings.warn("The 'delay_after_gen' parameter is deprecated starting from PyGAD 3.3.0. To delay or pause the evolution after each generation, assign a callback function/method to the 'on_generation' parameter to adds some time delay.")
if delay_after_gen != 0.0:
if not self.suppress_warnings:
warnings.warn("The 'delay_after_gen' parameter is deprecated starting from PyGAD 3.3.0. To delay or pause the evolution after each generation, assign a callback function/method to the 'on_generation' parameter to adds some time delay.")
if delay_after_gen >= 0.0:
self.delay_after_gen = delay_after_gen
else:
Expand Down

1 comment on commit 2daae49

@gnypit
Copy link

@gnypit gnypit commented on 2daae49 Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Which version of the pygad does this change belong to? I'm using pygad 3.3.1 and still have an issue here: #283

Sorry if I got mixed up somehow :(

Please sign in to comment.