(self)
| 507 | class TestMisc: |
| 508 | |
| 509 | def test_hermfromroots(self): |
| 510 | res = herm.hermfromroots([]) |
| 511 | assert_almost_equal(trim(res), [1]) |
| 512 | for i in range(1, 5): |
| 513 | roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2]) |
| 514 | pol = herm.hermfromroots(roots) |
| 515 | res = herm.hermval(roots, pol) |
| 516 | tgt = 0 |
| 517 | assert_(len(pol) == i + 1) |
| 518 | assert_almost_equal(herm.herm2poly(pol)[-1], 1) |
| 519 | assert_almost_equal(res, tgt) |
| 520 | |
| 521 | def test_hermroots(self): |
| 522 | assert_almost_equal(herm.hermroots([1]), []) |
nothing calls this directly
no test coverage detected