-
-
Notifications
You must be signed in to change notification settings - Fork 495
Open
Description
Hi,
I was writing some architecture to leverage PyGad and I came across a problem.
Basically I am using a class architecture and would like to have something like this:
class OnFitness(BaseGeneticClass):
def __call__ (ga_instance: pygad.GA, population_fitness):
# do stuff
on_fitness = OnFitness()
ga_instance = pygad.GA(..., on_fitness=on_fitness)
ga_instance.run()But I can't do that, because in the current implementation, to check the input parameters we have a check on the 'code' property, not for the call one. In this way, we can only use functions on gad, while this simple change to accept classes would be very beneficial to the library.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels