summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_legendre.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests/test_legendre.py')
-rw-r--r--numpy/polynomial/tests/test_legendre.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/numpy/polynomial/tests/test_legendre.py b/numpy/polynomial/tests/test_legendre.py
index f48f4c645..8846ca6f2 100644
--- a/numpy/polynomial/tests/test_legendre.py
+++ b/numpy/polynomial/tests/test_legendre.py
@@ -28,7 +28,7 @@ def trim(x):
return leg.legtrim(x, tol=1e-6)
-class TestConstants(object):
+class TestConstants:
def test_legdomain(self):
assert_equal(leg.legdomain, [-1, 1])
@@ -43,7 +43,7 @@ class TestConstants(object):
assert_equal(leg.legx, [0, 1])
-class TestArithmetic(object):
+class TestArithmetic:
x = np.linspace(-1, 1, 100)
def test_legadd(self):
@@ -110,7 +110,7 @@ class TestArithmetic(object):
assert_equal(trim(res), trim(tgt), err_msg=msg)
-class TestEvaluation(object):
+class TestEvaluation:
# coefficients of 1 + 2*x + 3*x**2
c1d = np.array([2., 2., 2.])
c2d = np.einsum('i,j->ij', c1d, c1d)
@@ -204,7 +204,7 @@ class TestEvaluation(object):
assert_(res.shape == (2, 3)*3)
-class TestIntegral(object):
+class TestIntegral:
def test_legint(self):
# check exceptions
@@ -306,7 +306,7 @@ class TestIntegral(object):
assert_almost_equal(res, tgt)
-class TestDerivative(object):
+class TestDerivative:
def test_legder(self):
# check exceptions
@@ -346,7 +346,7 @@ class TestDerivative(object):
assert_almost_equal(res, tgt)
-class TestVander(object):
+class TestVander:
# some random values in [-1, 1)
x = np.random.random((3, 5))*2 - 1
@@ -394,7 +394,7 @@ class TestVander(object):
assert_(van.shape == (1, 5, 24))
-class TestFitting(object):
+class TestFitting:
def test_legfit(self):
def f(x):
@@ -471,7 +471,7 @@ class TestFitting(object):
assert_almost_equal(coef1, coef2)
-class TestCompanion(object):
+class TestCompanion:
def test_raises(self):
assert_raises(ValueError, leg.legcompanion, [])
@@ -486,7 +486,7 @@ class TestCompanion(object):
assert_(leg.legcompanion([1, 2])[0, 0] == -.5)
-class TestGauss(object):
+class TestGauss:
def test_100(self):
x, w = leg.leggauss(100)
@@ -505,7 +505,7 @@ class TestGauss(object):
assert_almost_equal(w.sum(), tgt)
-class TestMisc(object):
+class TestMisc:
def test_legfromroots(self):
res = leg.legfromroots([])