(self)
| 508 | class TestMisc: |
| 509 | |
| 510 | def test_hermefromroots(self): |
| 511 | res = herme.hermefromroots([]) |
| 512 | assert_almost_equal(trim(res), [1]) |
| 513 | for i in range(1, 5): |
| 514 | roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2]) |
| 515 | pol = herme.hermefromroots(roots) |
| 516 | res = herme.hermeval(roots, pol) |
| 517 | tgt = 0 |
| 518 | assert_(len(pol) == i + 1) |
| 519 | assert_almost_equal(herme.herme2poly(pol)[-1], 1) |
| 520 | assert_almost_equal(res, tgt) |
| 521 | |
| 522 | def test_hermeroots(self): |
| 523 | assert_almost_equal(herme.hermeroots([1]), []) |
nothing calls this directly
no test coverage detected