(self)
| 526 | class TestMisc: |
| 527 | |
| 528 | def test_hermfromroots(self): |
| 529 | res = herm.hermfromroots([]) |
| 530 | assert_almost_equal(trim(res), [1]) |
| 531 | for i in range(1, 5): |
| 532 | roots = np.cos(np.linspace(-np.pi, 0, 2 * i + 1)[1::2]) |
| 533 | pol = herm.hermfromroots(roots) |
| 534 | res = herm.hermval(roots, pol) |
| 535 | tgt = 0 |
| 536 | assert_(len(pol) == i + 1) |
| 537 | assert_almost_equal(herm.herm2poly(pol)[-1], 1) |
| 538 | assert_almost_equal(res, tgt) |
| 539 | |
| 540 | def test_hermroots(self): |
| 541 | assert_almost_equal(herm.hermroots([1]), []) |
nothing calls this directly
no test coverage detected