summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-06 10:02:23 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-06 10:29:12 -0600
commit77e09f14bdf9eeebbd20ca861cb51da3e570bb72 (patch)
treeb0c49fa552ccad7d2e9a384db72b79f5a758ba83 /numpy/core/arrayprint.py
parent7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff)
downloadnumpy-77e09f14bdf9eeebbd20ca861cb51da3e570bb72.tar.gz
MAINT: Cleanup some imports involving reduce.
Because reduce has been available in functools since Python 2.6 we can get rid of the version checks we currently have before we import it. Also removes some reduce related skips in tools/py3tool.py. We were already skipping the reduce fixer so this has no effect other than cleaning up the code.
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index 6e53dca00..396ef5ae6 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -16,6 +16,7 @@ __docformat__ = 'restructuredtext'
# and by Travis Oliphant 2005-8-22 for numpy
import sys
+from functools import reduce
from . import numerictypes as _nt
from .umath import maximum, minimum, absolute, not_equal, isnan, isinf
from .multiarray import format_longfloat, datetime_as_string, datetime_data
@@ -34,8 +35,6 @@ _nan_str = 'nan'
_inf_str = 'inf'
_formatter = None # formatting function for array elements
-if sys.version_info[0] >= 3:
- from functools import reduce
def set_printoptions(precision=None, threshold=None, edgeitems=None,
linewidth=None, suppress=None,