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

Function test_identity

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

Source from the content-addressed store, hash-verified

93
94
95def test_identity(Poly):
96 d = Poly.domain + random((2,))*.25
97 w = Poly.window + random((2,))*.25
98 x = np.linspace(d[0], d[1], 11)
99 p = Poly.identity(domain=d, window=w)
100 assert_equal(p.domain, d)
101 assert_equal(p.window, w)
102 assert_almost_equal(p(x), x)
103
104
105def test_basis(Poly):

Callers

nothing calls this directly

Calls 5

assert_equalFunction · 0.90
assert_almost_equalFunction · 0.90
pFunction · 0.85
linspaceMethod · 0.80
identityMethod · 0.80

Tested by

no test coverage detected