summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_nanfunctions.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-09-02 13:21:48 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-09-03 05:22:10 -0600
commitd2c44c5a012d0a5db7d10a2586c8e9c58045d04b (patch)
treeb93306d17c5460a68d7e7fb29e6be729ad2a28dd /numpy/lib/tests/test_nanfunctions.py
parent57245e4570fa84f2e40a6fa1cc22716d279f8c00 (diff)
downloadnumpy-d2c44c5a012d0a5db7d10a2586c8e9c58045d04b.tar.gz
STY: Make numpy/lib/test/*.py PEP8 compliant.
Run autopep8 over the test files in numpy/lib/test and make fixes to the result. Also remove Python5 workaround.
Diffstat (limited to 'numpy/lib/tests/test_nanfunctions.py')
-rw-r--r--numpy/lib/tests/test_nanfunctions.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/numpy/lib/tests/test_nanfunctions.py b/numpy/lib/tests/test_nanfunctions.py
index 25f09275d..70e7865db 100644
--- a/numpy/lib/tests/test_nanfunctions.py
+++ b/numpy/lib/tests/test_nanfunctions.py
@@ -14,19 +14,19 @@ from numpy.lib import (
_ndat = np.array(
- [[ 0.6244, np.nan, 0.2692, 0.0116, np.nan, 0.1170],
- [ 0.5351, 0.9403, np.nan, 0.2100, 0.4759, 0.2833],
- [ np.nan, np.nan, np.nan, 0.1042, np.nan, 0.5954],
- [ 0.161, np.nan, np.nan, 0.1859, 0.3146, np.nan]]
- )
+ [[0.6244, np.nan, 0.2692, 0.0116, np.nan, 0.1170],
+ [0.5351, 0.9403, np.nan, 0.2100, 0.4759, 0.2833],
+ [np.nan, np.nan, np.nan, 0.1042, np.nan, 0.5954],
+ [0.161, np.nan, np.nan, 0.1859, 0.3146, np.nan]]
+)
# rows of _ndat with nans removed
_rdat = [
- np.array([ 0.6244, 0.2692, 0.0116, 0.1170]),
- np.array([ 0.5351, 0.9403, 0.2100, 0.4759, 0.2833]),
- np.array([ 0.1042, 0.5954]),
- np.array([ 0.1610, 0.1859, 0.3146])
- ]
+ np.array([0.6244, 0.2692, 0.0116, 0.1170]),
+ np.array([0.5351, 0.9403, 0.2100, 0.4759, 0.2833]),
+ np.array([0.1042, 0.5954]),
+ np.array([0.1610, 0.1859, 0.3146])
+]
class TestNanFunctions_MinMax(TestCase):
@@ -143,8 +143,8 @@ class TestNanFunctions_ArgminArgmax(TestCase):
class TestNanFunctions_IntTypes(TestCase):
int_types = (
- np.int8, np.int16, np.int32, np.int64, np.uint8,
- np.uint16, np.uint32, np.uint64)
+ np.int8, np.int16, np.int32, np.int64, np.uint8,
+ np.uint16, np.uint32, np.uint64)
def setUp(self, *args, **kwargs):
self.mat = np.array([127, 39, 93, 87, 46])
@@ -275,13 +275,13 @@ class TestNanFunctions_MeanVarStd(TestCase):
def test_dtype_error(self):
for f in self.nanfuncs:
for dtype in [np.bool_, np.int_, np.object]:
- assert_raises( TypeError, f, _ndat, axis=1, dtype=np.int)
+ assert_raises(TypeError, f, _ndat, axis=1, dtype=np.int)
def test_out_dtype_error(self):
for f in self.nanfuncs:
for dtype in [np.bool_, np.int_, np.object]:
out = np.empty(_ndat.shape[0], dtype=dtype)
- assert_raises( TypeError, f, _ndat, axis=1, out=out)
+ assert_raises(TypeError, f, _ndat, axis=1, out=out)
def test_keepdims(self):
mat = np.eye(3)