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 /numpy/core/arrayprint.py | |
parent | b753aa7a3a2c958e70826fb8af3b56db5c758819 (diff) | |
download | numpy-9a21ec857b22ff0140a7f71a12f2cc943f163404.tar.gz |
[MAINT] Cleanup python2 sys.version checks
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index 918da4a72..ec7e4261f 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -22,19 +22,12 @@ __docformat__ = 'restructuredtext' # scalars are printed inside an ndarray. Only the latter strs are currently # user-customizable. -import sys import functools import numbers -if sys.version_info[0] >= 3: - try: - from _thread import get_ident - except ImportError: - from _dummy_thread import get_ident -else: - try: - from thread import get_ident - except ImportError: - from dummy_thread import get_ident +try: + from _thread import get_ident +except ImportError: + from _dummy_thread import get_ident import numpy as np from . import numerictypes as _nt |