Exemple #1
0
 def test_chebyshev_points(self):
     """
     First and last interpolation points are -1 and 1
     """
     N = pow(2, 5)
     pts = Chebfun.interpolation_points(N)
     npt.assert_array_almost_equal(pts[[0, -1]], np.array([1., -1]))
 def test_chebyshev_points(self):
     """
     First and last interpolation points are -1 and 1
     """
     N = pow(2,5)
     pts = Chebfun.interpolation_points(N)
     npt.assert_array_almost_equal(pts[[0,-1]],np.array([1.,-1]))
Exemple #3
0
 def test_complex(self):
     n = 10
     r = np.random.randn(n) + 1j * np.random.randn(n)
     c = Chebfun.from_data(r)
     xs = Chebfun.interpolation_points(n)
     npt.assert_allclose(c(xs), r)
 def test_complex(self):
     n = 10
     r = np.random.randn(n) + 1j*np.random.randn(n)
     c = Chebfun.from_data(r)
     xs = Chebfun.interpolation_points(n)
     npt.assert_allclose(c(xs), r)