MCPcopy Index your code
hub / github.com/numpy/numpy / test_identity

Function test_identity

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

Source from the content-addressed store, hash-verified

99
100
101def test_identity(Poly):
102 d = Poly.domain + random((2,)) * .25
103 w = Poly.window + random((2,)) * .25
104 x = np.linspace(d[0], d[1], 11)
105 p = Poly.identity(domain=d, window=w)
106 assert_equal(p.domain, d)
107 assert_equal(p.window, w)
108 assert_almost_equal(p(x), x)
109
110
111def test_basis(Poly):

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
assert_almost_equalFunction · 0.90
linspaceMethod · 0.80
identityMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…