MCPcopy Create free account
hub / github.com/numpy/numpy / test_hermroots

Method test_hermroots

numpy/polynomial/tests/test_hermite.py:521–527  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

519 assert_almost_equal(res, tgt)
520
521 def test_hermroots(self):
522 assert_almost_equal(herm.hermroots([1]), [])
523 assert_almost_equal(herm.hermroots([1, 1]), [-.5])
524 for i in range(2, 5):
525 tgt = np.linspace(-1, 1, i)
526 res = herm.hermroots(herm.hermfromroots(tgt))
527 assert_almost_equal(trim(res), trim(tgt))
528
529 def test_hermtrim(self):
530 coef = [2, -1, 1, 0]

Callers

nothing calls this directly

Calls 3

assert_almost_equalFunction · 0.90
linspaceMethod · 0.80
trimFunction · 0.70

Tested by

no test coverage detected