summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_hermite.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests/test_hermite.py')
-rw-r--r--numpy/polynomial/tests/test_hermite.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/numpy/polynomial/tests/test_hermite.py b/numpy/polynomial/tests/test_hermite.py
index 06ce46ae4..2e39d854d 100644
--- a/numpy/polynomial/tests/test_hermite.py
+++ b/numpy/polynomial/tests/test_hermite.py
@@ -7,8 +7,9 @@ import numpy as np
import numpy.polynomial.hermite as herm
from numpy.polynomial.polynomial import polyval
from numpy.testing import (
- TestCase, assert_almost_equal, assert_raises,
- assert_equal, assert_, run_module_suite)
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ run_module_suite
+ )
H0 = np.array([1])
H1 = np.array([0, 2])
@@ -28,7 +29,7 @@ def trim(x):
return herm.hermtrim(x, tol=1e-6)
-class TestConstants(TestCase):
+class TestConstants(object):
def test_hermdomain(self):
assert_equal(herm.hermdomain, [-1, 1])
@@ -43,7 +44,7 @@ class TestConstants(TestCase):
assert_equal(herm.hermx, [0, .5])
-class TestArithmetic(TestCase):
+class TestArithmetic(object):
x = np.linspace(-3, 3, 100)
def test_hermadd(self):
@@ -100,7 +101,7 @@ class TestArithmetic(TestCase):
assert_equal(trim(res), trim(tgt), err_msg=msg)
-class TestEvaluation(TestCase):
+class TestEvaluation(object):
# coefficients of 1 + 2*x + 3*x**2
c1d = np.array([2.5, 1., .75])
c2d = np.einsum('i,j->ij', c1d, c1d)
@@ -194,7 +195,7 @@ class TestEvaluation(TestCase):
assert_(res.shape == (2, 3)*3)
-class TestIntegral(TestCase):
+class TestIntegral(object):
def test_hermint(self):
# check exceptions
@@ -293,7 +294,7 @@ class TestIntegral(TestCase):
assert_almost_equal(res, tgt)
-class TestDerivative(TestCase):
+class TestDerivative(object):
def test_hermder(self):
# check exceptions
@@ -333,7 +334,7 @@ class TestDerivative(TestCase):
assert_almost_equal(res, tgt)
-class TestVander(TestCase):
+class TestVander(object):
# some random values in [-1, 1)
x = np.random.random((3, 5))*2 - 1
@@ -381,7 +382,7 @@ class TestVander(TestCase):
assert_(van.shape == (1, 5, 24))
-class TestFitting(TestCase):
+class TestFitting(object):
def test_hermfit(self):
def f(x):
@@ -458,7 +459,7 @@ class TestFitting(TestCase):
assert_almost_equal(coef1, coef2)
-class TestCompanion(TestCase):
+class TestCompanion(object):
def test_raises(self):
assert_raises(ValueError, herm.hermcompanion, [])
@@ -473,7 +474,7 @@ class TestCompanion(TestCase):
assert_(herm.hermcompanion([1, 2])[0, 0] == -.25)
-class TestGauss(TestCase):
+class TestGauss(object):
def test_100(self):
x, w = herm.hermgauss(100)
@@ -492,7 +493,7 @@ class TestGauss(TestCase):
assert_almost_equal(w.sum(), tgt)
-class TestMisc(TestCase):
+class TestMisc(object):
def test_hermfromroots(self):
res = herm.hermfromroots([])