diff options
author | Ganesh Kathiresan <ganesh3597@gmail.com> | 2020-11-23 15:16:20 +0530 |
---|---|---|
committer | Ganesh Kathiresan <ganesh3597@gmail.com> | 2020-11-23 15:16:20 +0530 |
commit | a5e12353c78e6be9a04a0bd2b2c92daa74875a64 (patch) | |
tree | 00dc3cfabfcaa2d63b82ca81a652a82d956a9421 /benchmarks | |
parent | 8912ffd9da549bb5a4dbb34eb9de10fd1c19ce43 (diff) | |
download | numpy-a5e12353c78e6be9a04a0bd2b2c92daa74875a64.tar.gz |
BENCH: Improve floor divide benchmarks (#17727)
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/benchmarks/bench_ufunc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmarks/benchmarks/bench_ufunc.py b/benchmarks/benchmarks/bench_ufunc.py index ef3ebe75f..13b7382a1 100644 --- a/benchmarks/benchmarks/bench_ufunc.py +++ b/benchmarks/benchmarks/bench_ufunc.py @@ -135,7 +135,7 @@ class CustomScalar(Benchmark): class CustomScalarFloorDivideInt(Benchmark): - params = ([np.int8, np.int16, np.int32, np.int64], [8, -8, 43, -43]) + params = ([np.int8, np.int16, np.int32, np.int64], [8, -8, 43, -43, 0]) param_names = ['dtype', 'divisors'] max_value = 10**7 min_value = -10**7 @@ -144,7 +144,7 @@ class CustomScalarFloorDivideInt(Benchmark): iinfo = np.iinfo(dtype) self.x = np.arange( max(iinfo.min, self.min_value), - min(iinfo.max, self.max_value)) + min(iinfo.max, self.max_value), dtype=dtype) def time_floor_divide_int(self, dtpye, divisor): self.x // divisor |