diff --git a/pymoo/util/nds/non_dominated_sorting.py b/pymoo/util/nds/non_dominated_sorting.py index 4c053c46..ac4cfd66 100644 --- a/pymoo/util/nds/non_dominated_sorting.py +++ b/pymoo/util/nds/non_dominated_sorting.py @@ -1,5 +1,5 @@ import numpy as np - +import sys from pymoo.util.dominator import Dominator from pymoo.util.function_loader import load_function @@ -53,7 +53,7 @@ def do(self, F, return_rank=False, only_non_dominated_front=False, n_stop_if_ran def rank_from_fronts(fronts, n): # create the rank array and set values - rank = np.full(n, 1e16, dtype=int) + rank = np.full(n, sys.maxsize, dtype=int) for i, front in enumerate(fronts): rank[front] = i