From 37ccc6d58acad728e993818a3ac4c554dd3e7b5c Mon Sep 17 00:00:00 2001 From: Thieu Nguyen Date: Fri, 22 Mar 2024 17:18:35 +0700 Subject: [PATCH] Fix bug LennardJones function --- opfunu/name_based/l_func.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opfunu/name_based/l_func.py b/opfunu/name_based/l_func.py index 15c8532..0582836 100644 --- a/opfunu/name_based/l_func.py +++ b/opfunu/name_based/l_func.py @@ -110,8 +110,8 @@ def __init__(self, ndim=None, bounds=None): raise ValueError("LennardJones dimensions must be in (6, 60)") super().__init__() self.dim_changeable = True - self.dim_default = 2 - self.check_ndim_and_bounds(ndim, bounds, np.array([[-4., 1.] for _ in range(self.dim_default)])) + self.dim_default = 6 + self.check_ndim_and_bounds(ndim, bounds, np.array([[-4., 4.] for _ in range(self.dim_default)])) self.minima = [-1.0, -3.0, -6.0, -9.103852, -12.712062, -16.505384, -19.821489, -24.113360, -28.422532, -32.765970, -37.967600, -44.326801, -47.845157,