(self)
| 589 | assert_(Chebyshev.interpolate(self.f, deg).degree() == deg) |
| 590 | |
| 591 | def test_approximation(self): |
| 592 | |
| 593 | def powx(x, p): |
| 594 | return x**p |
| 595 | |
| 596 | x = np.linspace(0, 2, 10) |
| 597 | for deg in range(0, 10): |
| 598 | for t in range(0, deg + 1): |
| 599 | p = Chebyshev.interpolate(powx, deg, domain=[0, 2], args=(t,)) |
| 600 | assert_almost_equal(p(x), powx(x, t), decimal=11) |
nothing calls this directly
no test coverage detected