Skip to content

Commit

Permalink
Fix NumbaDeprecationWarning in AGE-MOEA and AGE-MOEA-II
Browse files Browse the repository at this point in the history
  • Loading branch information
apanichella committed Aug 14, 2024
1 parent ff63e28 commit 4734eb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pymoo/algorithms/moo/age.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def compute_geometry(front, extreme, n):
return p

@staticmethod
@jit(fastmath=True)
@jit(nopython=True, fastmath=True)
def pairwise_distances(front, p):
m = np.shape(front)[0]
distances = np.zeros((m, m))
Expand All @@ -219,7 +219,7 @@ def pairwise_distances(front, p):
return distances

@staticmethod
@jit(fastmath=True)
@jit(nopython=True, fastmath=True)
def minkowski_distances(A, B, p):
m1 = np.shape(A)[0]
m2 = np.shape(B)[0]
Expand Down Expand Up @@ -254,7 +254,7 @@ def find_corner_solutions(front):
return indexes


@jit(fastmath=True)
@jit(nopython=True, fastmath=True)
def point_2_line_distance(P, A, B):
d = np.zeros(P.shape[0])

Expand Down
4 changes: 2 additions & 2 deletions pymoo/algorithms/moo/age2.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self,
self.tournament_type = 'comp_by_rank_and_crowding'


@jit(fastmath=True)
@jit(nopython=True, fastmath=True)
def project_on_manifold(point, p):
dist = sum(point[point > 0] ** p) ** (1/p)
return np.multiply(point, 1 / dist)
Expand Down Expand Up @@ -140,7 +140,7 @@ def compute_geometry(front, extreme, n):
return p

@staticmethod
@jit(fastmath=True)
@jit(nopython=True, fastmath=True)
def pairwise_distances(front, p):
m, n = front.shape
projected_front = front.copy()
Expand Down

0 comments on commit 4734eb1

Please sign in to comment.