Skip to content

Commit

Permalink
Update np.random in WCA
Browse files Browse the repository at this point in the history
  • Loading branch information
thieupu committed Nov 5, 2023
1 parent c9f1098 commit 6e5c8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mealpy/system_based/WCA.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def initialization(self):
idx_already_selected = []
for i in range(0, self.nsr - 1):
streams[i] = []
idx_list = np.random.choice(list(set(range(0, n_stream)) - set(idx_already_selected)), num_child_in_river_list[i], replace=False).tolist()
idx_list = self.generator.choice(list(set(range(0, n_stream)) - set(idx_already_selected)), num_child_in_river_list[i], replace=False).tolist()
idx_already_selected += idx_list
for idx in idx_list:
streams[i].append(self.pop_stream[idx])
Expand Down

0 comments on commit 6e5c8db

Please sign in to comment.