diff options
author | Seth Troisi <sethtroisi@google.com> | 2020-01-15 17:03:58 -0800 |
---|---|---|
committer | Seth Troisi <sethtroisi@google.com> | 2020-01-20 15:22:57 -0800 |
commit | 9a21ec857b22ff0140a7f71a12f2cc943f163404 (patch) | |
tree | 1f8b26a1bb346fab26d2210de286d29011bf2bf1 /benchmarks | |
parent | b753aa7a3a2c958e70826fb8af3b56db5c758819 (diff) | |
download | numpy-9a21ec857b22ff0140a7f71a12f2cc943f163404.tar.gz |
[MAINT] Cleanup python2 sys.version checks
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/benchmarks/bench_indexing.py | 6 |
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) |