Skip to content

Commit

Permalink
Update non_dominated_sorting.py (#653)
Browse files Browse the repository at this point in the history
* Update non_dominated_sorting.py

Fixing error #611

* Update non_dominated_sorting.py
  • Loading branch information
alibaba613 authored Nov 25, 2024
1 parent ecc38ec commit 28789d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymoo/util/nds/non_dominated_sorting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np

import sys
from pymoo.util.dominator import Dominator
from pymoo.util.function_loader import load_function

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 28789d3

Please sign in to comment.