Skip to content

Commit

Permalink
Use integers instead of randint
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Dec 14, 2024
1 parent 755581c commit 7d58af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def randn(shape, frac_nan=None, chunks=None, seed=0):

def randint(low, high=None, size=None, frac_minus=None, seed=0):
rng = np.random.default_rng(seed)
x = rng.randint(low, high, size)
x = rng.integers(low, high, size)
if frac_minus is not None:
inds = rng.choice(range(x.size), int(x.size * frac_minus))
x.flat[inds] = -1
Expand Down

0 comments on commit 7d58af8

Please sign in to comment.