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

Function test_trim

numpy/polynomial/tests/test_classes.py:546–551  ·  view source on GitHub ↗
(Poly)

Source from the content-addressed store, hash-verified

544
545
546def test_trim(Poly):
547 c = [1, 1e-6, 1e-12, 0]
548 p = Poly(c)
549 assert_equal(p.trim().coef, c[:3])
550 assert_equal(p.trim(1e-10).coef, c[:2])
551 assert_equal(p.trim(1e-5).coef, c[:1])
552
553
554def test_mapparms(Poly):

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
PolyFunction · 0.85
trimMethod · 0.80

Tested by

no test coverage detected