Skip to content

Commit

Permalink
Return indices also if population is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouhia committed May 1, 2022
1 parent c2a4cbd commit 38a347e
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 38a347e

Please sign in to comment.