summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2023-01-03 14:31:51 +0200
committerGitHub <noreply@github.com>2023-01-03 14:31:51 +0200
commit471d5681b0dd5781d1c3d5489a0eb046fdf67700 (patch)
tree2d452cac209b2e58a855d7cfbbd2a9bc00cd598d /benchmarks
parent17388bb13bca084679e9680cf49999c4c3388983 (diff)
downloadnumpy-471d5681b0dd5781d1c3d5489a0eb046fdf67700.tar.gz
BENCH: use intp dtype when indexing
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_ufunc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmarks/benchmarks/bench_ufunc.py b/benchmarks/benchmarks/bench_ufunc.py
index 6fd9bf51b..090f19224 100644
--- a/benchmarks/benchmarks/bench_ufunc.py
+++ b/benchmarks/benchmarks/bench_ufunc.py
@@ -37,7 +37,7 @@ class Broadcast(Benchmark):
class At(Benchmark):
def setup(self):
self.vals = np.random.rand(1_000_000)
- self.idx = np.random.randint(1000, size=1_000_000)
+ self.idx = np.random.randint(1000, size=1_000_000).astype(np.intp)
self.res = np.zeros(1000, dtype=self.vals.dtype)
def time_sum_at(self):