Open
Description
Howdy!
I have been using pygad for a while, but I just noticed when flipping on save_best_solutions, the saved solution list is converted into a list of ndarrays as opposed to a list of lists. This creates a fundamental issue on line 1682 (I think) where the comparison throws up an ambiguity error. Using Python 3.8.
Fixed by changing line at 1887 to
self.best_solutions = [arr.tolist() for arr in self.best_solutions]
May need to differentiate between multi-objective and single-objective optimization. This error may also exist with line 1893 with save_solutions.
Cheers,
Mythra