From 28789d324d22b31cec32b66f9957521f1a3d5dfc Mon Sep 17 00:00:00 2001 From: alibaba613 <55627335+alibaba613@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:34:41 -0500 Subject: [PATCH] Update non_dominated_sorting.py (#653) * Update non_dominated_sorting.py Fixing error #611 * Update non_dominated_sorting.py --- pymoo/util/nds/non_dominated_sorting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymoo/util/nds/non_dominated_sorting.py b/pymoo/util/nds/non_dominated_sorting.py index 4c053c462..ac4cfd66e 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