(self)
| 614 | assert_(Chebyshev.interpolate(self.f, deg).degree() == deg) |
| 615 | |
| 616 | def test_approximation(self): |
| 617 | |
| 618 | def powx(x, p): |
| 619 | return x**p |
| 620 | |
| 621 | x = np.linspace(0, 2, 10) |
| 622 | for deg in range(10): |
| 623 | for t in range(deg + 1): |
| 624 | p = Chebyshev.interpolate(powx, deg, domain=[0, 2], args=(t,)) |
| 625 | assert_almost_equal(p(x), powx(x, t), decimal=11) |
nothing calls this directly
no test coverage detected