Skip to content

Commit

Permalink
Merge pull request anyoptimization#273 from mkouhia/feature/duplicate…
Browse files Browse the repository at this point in the history
…-do-pop

Return indices also if population is empty
  • Loading branch information
blankjul authored May 2, 2022
2 parents c2a4cbd + 38a347e commit 7a22e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymoo/core/duplicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def do(self, pop, *args, return_indices=False, to_itself=True):
original = pop

if len(pop) == 0:
return pop
return (pop, [], []) if return_indices else pop

if to_itself:
pop = pop[~self._do(pop, None, np.full(len(pop), False))]
Expand Down

0 comments on commit 7a22e24

Please sign in to comment.