summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_legendre.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-08-04 14:32:34 -0600
committerCharles Harris <charlesr.harris@gmail.com>2014-08-04 14:32:34 -0600
commit192f025ce5280dffbdd361e3ee0645aa08764156 (patch)
tree5d396aa22ec11fcb3000600d8e43d1ee1bfec7f6 /numpy/polynomial/tests/test_legendre.py
parent74bd706d6fccb0512b276a038274680fd6568b75 (diff)
parentf9c6398d4f021e9509e19157a0d5ee72b27a8c2a (diff)
downloadnumpy-192f025ce5280dffbdd361e3ee0645aa08764156.tar.gz
Merge pull request #4924 from charris/pep8-numpy-polynomial
Pep8 numpy polynomial
Diffstat (limited to 'numpy/polynomial/tests/test_legendre.py')
-rw-r--r--numpy/polynomial/tests/test_legendre.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/numpy/polynomial/tests/test_legendre.py b/numpy/polynomial/tests/test_legendre.py
index e248f005d..8ac1feb58 100644
--- a/numpy/polynomial/tests/test_legendre.py
+++ b/numpy/polynomial/tests/test_legendre.py
@@ -120,7 +120,6 @@ class TestEvaluation(TestCase):
y = [polyval(x, c) for c in Llist]
for i in range(10):
msg = "At i=%d" % i
- ser = np.zeros
tgt = y[i]
res = leg.legval(x, [0]*i + [1])
assert_almost_equal(res, tgt, err_msg=msg)
@@ -390,14 +389,14 @@ class TestFitting(TestCase):
return x*(x - 1)*(x - 2)
# Test exceptions
- assert_raises(ValueError, leg.legfit, [1], [1], -1)
- assert_raises(TypeError, leg.legfit, [[1]], [1], 0)
- assert_raises(TypeError, leg.legfit, [], [1], 0)
- assert_raises(TypeError, leg.legfit, [1], [[[1]]], 0)
- assert_raises(TypeError, leg.legfit, [1, 2], [1], 0)
- assert_raises(TypeError, leg.legfit, [1], [1, 2], 0)
- assert_raises(TypeError, leg.legfit, [1], [1], 0, w=[[1]])
- assert_raises(TypeError, leg.legfit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, leg.legfit, [1], [1], -1)
+ assert_raises(TypeError, leg.legfit, [[1]], [1], 0)
+ assert_raises(TypeError, leg.legfit, [], [1], 0)
+ assert_raises(TypeError, leg.legfit, [1], [[[1]]], 0)
+ assert_raises(TypeError, leg.legfit, [1, 2], [1], 0)
+ assert_raises(TypeError, leg.legfit, [1], [1, 2], 0)
+ assert_raises(TypeError, leg.legfit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, leg.legfit, [1], [1], 0, w=[1, 1])
# Test fit
x = np.linspace(0, 2)