Skip to content

Commit

Permalink
replace np.random with rng (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent-Maladiere authored Aug 22, 2023
1 parent 7a77fd5 commit bc7f4d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skrub/datasets/_generating.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def make_deduplication_data(
# Randomly pick with which character to replace
replacements = [
string.ascii_lowercase[i]
for i in np.random.choice(np.arange(26), len(mis_idx)).astype(int)
for i in rng.choice(np.arange(26), len(mis_idx)).astype(int)
]
# Introduce spelling mistakes at right examples and char locations per example
str_as_list[mis_idx // len_ex, mis_idx % len_ex] = replacements
Expand Down

0 comments on commit bc7f4d6

Please sign in to comment.