Skip to content

Commit

Permalink
Fix numpy 2.0 compatibility in ILSHADE implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
firefly-cpp committed Nov 8, 2024
1 parent b1fa91f commit 99cb246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion niapy/algorithms/modified/ilshade.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def post_selection(self, pop, arc, arc_ind_cnt, task, xb, fxb, pbest_factor, **k
max_nfe = task.max_evals
nfe = task.evals

next_pop_size = np.int_(np.around((((4.0 - self.population_size) / np.float_(max_nfe)) * nfe) + self.population_size))
next_pop_size = np.int_(np.around((((4.0 - self.population_size) / np.float64(max_nfe)) * nfe) + self.population_size))

if next_pop_size < 4:
next_pop_size = 4
Expand Down

0 comments on commit 99cb246

Please sign in to comment.