summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2020-01-15 17:03:58 -0800
committerSeth Troisi <sethtroisi@google.com>2020-01-20 15:22:57 -0800
commit9a21ec857b22ff0140a7f71a12f2cc943f163404 (patch)
tree1f8b26a1bb346fab26d2210de286d29011bf2bf1 /benchmarks
parentb753aa7a3a2c958e70826fb8af3b56db5c758819 (diff)
downloadnumpy-9a21ec857b22ff0140a7f71a12f2cc943f163404.tar.gz
[MAINT] Cleanup python2 sys.version checks
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_indexing.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/benchmarks/benchmarks/bench_indexing.py b/benchmarks/benchmarks/bench_indexing.py
index 2bcf7efad..9ee0d1fb5 100644
--- a/benchmarks/benchmarks/bench_indexing.py
+++ b/benchmarks/benchmarks/bench_indexing.py
@@ -2,7 +2,6 @@ from .common import Benchmark, get_squares_, get_indexes_, get_indexes_rand_
from os.path import join as pjoin
import shutil
-import sys
from numpy import memmap, float32, array
import numpy as np
from tempfile import mkdtemp
@@ -22,10 +21,7 @@ class Indexing(Benchmark):
'indexes_': get_indexes_(),
'indexes_rand_': get_indexes_rand_()}
- if sys.version_info[0] >= 3:
- code = "def run():\n for a in squares_.values(): a[%s]%s"
- else:
- code = "def run():\n for a in squares_.itervalues(): a[%s]%s"
+ code = "def run():\n for a in squares_.values(): a[%s]%s"
code = code % (sel, op)
exec(code, ns)