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

Function test_call

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

Source from the content-addressed store, hash-verified

512
513
514def test_call(Poly):
515 P = Polynomial
516 d = Poly.domain
517 x = np.linspace(d[0], d[1], 11)
518
519 # Check defaults
520 p = Poly.cast(P([1, 2, 3]))
521 tgt = 1 + x*(2 + 3*x)
522 res = p(x)
523 assert_almost_equal(res, tgt)
524
525
526def test_cutdeg(Poly):

Callers

nothing calls this directly

Calls 4

assert_almost_equalFunction · 0.90
pFunction · 0.85
linspaceMethod · 0.80
castMethod · 0.45

Tested by

no test coverage detected