Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

For multi-objective optimization, Lists of Saved Best Solution Causes Error When Loadedd #300

Open
Labels
bugSomething isn't working
@MommyMythra

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /