Skip to content

Commit 99cb246

Browse files
committed
Fix numpy 2.0 compatibility in ILSHADE implementation
1 parent b1fa91f commit 99cb246

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

niapy/algorithms/modified/ilshade.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def post_selection(self, pop, arc, arc_ind_cnt, task, xb, fxb, pbest_factor, **k
244244
max_nfe = task.max_evals
245245
nfe = task.evals
246246

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

249249
if next_pop_size < 4:
250250
next_pop_size = 4

0 commit comments

Comments
 (0)