From 11b80e7bd14501f33e6e0d9704afca8b10dce695 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 20 Feb 2010 18:20:10 +0000 Subject: 3K: BUG: work around bugs in Python 3.1.1 2to3 by not using fixes_reduce Instead, manually import reduce where necessary. --- numpy/ma/tests/test_core.py | 4 ++++ numpy/ma/tests/test_old_ma.py | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'numpy/ma/tests') diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index 74bd2f722..7494de4cd 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -19,6 +19,10 @@ from numpy.ma.core import * pi = np.pi +import sys +if sys.version_info[0] >= 3: + from functools import reduce + #.............................................................................. class TestMaskedArray(TestCase): "Base test class for MaskedArrays." diff --git a/numpy/ma/tests/test_old_ma.py b/numpy/ma/tests/test_old_ma.py index 4887a228c..cf169dd70 100644 --- a/numpy/ma/tests/test_old_ma.py +++ b/numpy/ma/tests/test_old_ma.py @@ -5,6 +5,10 @@ from numpy.core.numerictypes import float32 from numpy.ma.core import umath from numpy.testing import * +import sys +if sys.version_info[0] >= 3: + from functools import reduce + pi = numpy.pi def eq(v,w, msg=''): result = allclose(v,w) -- cgit v1.2.1