Skip to content

Commit

Permalink
Compatible with the latest version of numpy.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbyysheng authored Dec 24, 2023
1 parent 28835af commit d0d8e0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion geatpy/benchmarks/mops/DTLZ5.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def calReferObjV(self): # 设定目标数参考值(本问题目标函数参
P = np.vstack([np.linspace(0, 1, N), np.linspace(1, 0, N)]).T
P = P / np.tile(np.sqrt(np.sum(P**2, 1, keepdims=True)),
(1, P.shape[1]))
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int)], P])
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int32)], P])
referenceObjV = P / np.sqrt(2)**np.tile(
np.hstack([self.M - 2, np.linspace(self.M - 2, 0, self.M - 1)]),
(P.shape[0], 1))
Expand Down
2 changes: 1 addition & 1 deletion geatpy/benchmarks/mops/DTLZ6.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def calReferObjV(self): # 设定目标数参考值(本问题目标函数参
P = np.vstack([np.linspace(0, 1, N), np.linspace(1, 0, N)]).T
P = P / np.tile(np.sqrt(np.sum(P**2, 1, keepdims=True)),
(1, P.shape[1]))
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int)], P])
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int32)], P])
referenceObjV = P / np.sqrt(2)**np.tile(
np.hstack([self.M - 2, np.linspace(self.M - 2, 0, self.M - 1)]),
(P.shape[0], 1))
Expand Down

0 comments on commit d0d8e0c

Please sign in to comment.