summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2023-02-18 21:32:35 +0000
committerRohit Goswami <rog32@hi.is>2023-03-04 15:42:59 +0000
commit88fbec0e6b19927dfcd7ff83e1dfc25473a7a1bc (patch)
treefa4a16ebb353427eda151d23c8bd5360e3d8c231 /benchmarks
parent2abab1008942113780cddfdc49da0e2c2fe905ef (diff)
downloadnumpy-88fbec0e6b19927dfcd7ff83e1dfc25473a7a1bc.tar.gz
BENCH: Refactor as per review comments
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_ufunc.py12
-rw-r--r--benchmarks/benchmarks/common.py4
2 files changed, 9 insertions, 7 deletions
diff --git a/benchmarks/benchmarks/bench_ufunc.py b/benchmarks/benchmarks/bench_ufunc.py
index a1316bd1d..99df2c32a 100644
--- a/benchmarks/benchmarks/bench_ufunc.py
+++ b/benchmarks/benchmarks/bench_ufunc.py
@@ -138,10 +138,12 @@ class MethodsV1(Benchmark):
timeout = 10
def setup(self, methname, npdtypes):
- if (npdtypes.startswith('complex') and
- methname in ['__floordiv__', '__mod__']) or \
- (not npdtypes.startswith('int') and
- methname in ['__and__', '__or__', '__xor__']):
+ if (
+ npdtypes.startswith("complex") and methname in ["__floordiv__", "__mod__"]
+ ) or (
+ not npdtypes.startswith("int")
+ and methname in ["__and__", "__or__", "__xor__"]
+ ):
raise NotImplementedError # skip
values = get_squares_().get(npdtypes)
self.xarg_one = values[0]
@@ -269,7 +271,7 @@ class UfuncsFromDLP(Benchmark):
timeout = 10
def setup(self, shape, npdtypes):
- if npdtypes in ['longfloat', 'complex256']:
+ if npdtypes in ['longdouble', 'clongdouble']:
raise NotImplementedError(
'Only IEEE dtypes are supported')
values = get_squares_()
diff --git a/benchmarks/benchmarks/common.py b/benchmarks/benchmarks/common.py
index a790d9b35..ab4867d15 100644
--- a/benchmarks/benchmarks/common.py
+++ b/benchmarks/benchmarks/common.py
@@ -21,10 +21,10 @@ TYPES1 = [
'int16', 'float16',
'int32', 'float32',
'int64', 'float64', 'complex64',
- 'longfloat', 'complex128',
+ 'longdouble', 'complex128',
]
if 'complex256' in np.sctypeDict:
- TYPES1.append('complex256')
+ TYPES1.append('clongdouble')
DLPACK_TYPES = [
'int16', 'float16',