Skip to content

Commit

Permalink
Fix bug ndim in Benchmark class
Browse files Browse the repository at this point in the history
  • Loading branch information
thieu1995 committed Mar 22, 2024
1 parent 5735acb commit 83379ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opfunu/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def check_ndim_and_bounds(self, ndim=None, bounds=None, default_bounds=None):
"""
if ndim is None:
self._bounds = default_bounds if bounds is None else np.array(bounds).T
self._ndim = self._bounds.shape[1]
self._ndim = self._bounds.shape[0]
else:
if bounds is None:
if self.dim_changeable:
Expand Down Expand Up @@ -239,7 +239,7 @@ def ub(self):
"""
return np.array([x[1] for x in self.bounds])

def create_solution(self):
def create_solution(self) -> np.ndarray:
"""
Create a random solution for the current problem
Expand Down

0 comments on commit 83379ff

Please sign in to comment.