Possible typo in the provided code.

Possible typo in the provided code.

by Mathis Finckh -
Number of replies: 1
Hi, I was trying to understand the workings of parameter n_parents, but it seems like it isn't used later in the code. The only time sort_and_select_parents is called, it's given the whole population to choose from, not our selected number of parents. Is that supposed to be this way ?
Thanks already ! 

In nsga.py, NSGAII.tell()
# Select best n_pop individuals from combined population
parents_population, parents_fitness = self.sort_and_select_parents(
combined_population, combined_fitness, self.n_pop
)
In reply to Mathis Finckh

Re: Possible typo in the provided code.

by Fuda van Diggelen -
Hi Mathis, you are right this is a typo and should be self.n_parents. We updated the repo accordingly, you can edit the file yourself or pull from upstream.