diff --git a/geatpy/benchmarks/mops/DTLZ5.py b/geatpy/benchmarks/mops/DTLZ5.py index e2f85f44..e1bf1c8f 100644 --- a/geatpy/benchmarks/mops/DTLZ5.py +++ b/geatpy/benchmarks/mops/DTLZ5.py @@ -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)) diff --git a/geatpy/benchmarks/mops/DTLZ6.py b/geatpy/benchmarks/mops/DTLZ6.py index 0933cc01..0517126d 100644 --- a/geatpy/benchmarks/mops/DTLZ6.py +++ b/geatpy/benchmarks/mops/DTLZ6.py @@ -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))