From 38a347e5f08349c636010b177e6e12a97ace0c25 Mon Sep 17 00:00:00 2001 From: Mikko Kouhia Date: Sun, 1 May 2022 12:38:02 +0300 Subject: [PATCH] Return indices also if population is empty --- pymoo/core/duplicate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymoo/core/duplicate.py b/pymoo/core/duplicate.py index 0606e91db..172f66195 100644 --- a/pymoo/core/duplicate.py +++ b/pymoo/core/duplicate.py @@ -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))]