interpax_fft.cheb_pts

interpax_fft.cheb_pts(n, domain=(-1, 1), lobatto=False)Source

Get n Chebyshev points mapped to given domain.

Warning

This is a common definition of the Chebyshev points (see Boyd, Chebyshev and Fourier Spectral Methods p. 498). These are the points demanded by discrete cosine transformations to interpolate Chebyshev series because the cosine basis for the DCT is defined on [0, π]. They differ in ordering from the points returned by numpy.polynomial.chebyshev.chebpts1 and numpy.polynomial.chebyshev.chebpts2.

Parameters:
  • n (int) – Number of points.

  • domain (tuple[float]) – Domain for points.

  • lobatto (bool) – Whether to return the Gauss-Lobatto (extrema-plus-endpoint) instead of the interior roots for Chebyshev points.

Returns:

pts (jnp.ndarray) – Shape (n, ). Chebyshev points mapped to given domain.