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

Method test_hermeroots

numpy/polynomial/tests/test_hermite_e.py:522–528  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

520 assert_almost_equal(res, tgt)
521
522 def test_hermeroots(self):
523 assert_almost_equal(herme.hermeroots([1]), [])
524 assert_almost_equal(herme.hermeroots([1, 1]), [-1])
525 for i in range(2, 5):
526 tgt = np.linspace(-1, 1, i)
527 res = herme.hermeroots(herme.hermefromroots(tgt))
528 assert_almost_equal(trim(res), trim(tgt))
529
530 def test_hermetrim(self):
531 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