Skip to content

Commit b8b7c84

Browse files
authored
Merge pull request #349 from jsbyysheng/master
Compatible with the latest version of numpy.
2 parents 28835af + d0d8e0c commit b8b7c84

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

geatpy/benchmarks/mops/DTLZ5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def calReferObjV(self): # 设定目标数参考值(本问题目标函数参
5151
P = np.vstack([np.linspace(0, 1, N), np.linspace(1, 0, N)]).T
5252
P = P / np.tile(np.sqrt(np.sum(P**2, 1, keepdims=True)),
5353
(1, P.shape[1]))
54-
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int)], P])
54+
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int32)], P])
5555
referenceObjV = P / np.sqrt(2)**np.tile(
5656
np.hstack([self.M - 2, np.linspace(self.M - 2, 0, self.M - 1)]),
5757
(P.shape[0], 1))

geatpy/benchmarks/mops/DTLZ6.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def calReferObjV(self): # 设定目标数参考值(本问题目标函数参
5151
P = np.vstack([np.linspace(0, 1, N), np.linspace(1, 0, N)]).T
5252
P = P / np.tile(np.sqrt(np.sum(P**2, 1, keepdims=True)),
5353
(1, P.shape[1]))
54-
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int)], P])
54+
P = np.hstack([P[:, np.zeros(self.M - 2, dtype=np.int32)], P])
5555
referenceObjV = P / np.sqrt(2)**np.tile(
5656
np.hstack([self.M - 2, np.linspace(self.M - 2, 0, self.M - 1)]),
5757
(P.shape[0], 1))

0 commit comments

Comments
 (0)