parameters: (deg)
return_statement: return x, w
docstring: Gauss-Chebyshev quadrature.
  
      Computes the sample points and weights for Gauss-Chebyshev quadrature.
      These sample points and weights will correctly integrate polynomials of
      degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with
      the weight function :math:`f(x) = 1/\\sqrt{1 - x^2}`.
  
      Parameters
      ----------
      deg : int
          Number of sample points and weights. It must be >= 1.
  
      Returns
      -------
      x : ndarray
          1-D ndarray containing the sample points.
      y : ndarray
          1-D ndarray containing the weights.
  
      Notes
      -----
  
      .. versionadded:: 1.7.0
  
      The results have only been tested up to degree 100, higher degrees may
      be problematic. For Gauss-Chebyshev there are closed form solutions for
      the sample points and weights. If n = `deg`, then
  
      .. math:: x_i = \\cos(\\pi (2 i - 1) / (2 n))
  
      .. math:: w_i = \\pi / n
docstring_summary: Gauss-Chebyshev quadrature.
docstring_tokens: Gauss - Chebyshev quadrature .
function: def chebgauss(deg):
      """
      Gauss-Chebyshev quadrature.
  
      Computes the sample points and weights for Gauss-Chebyshev quadrature.
      These sample points and weights will correctly integrate polynomials of
      degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with
      the weight function :math:`f(x) = 1/\\sqrt{1 - x^2}`.
  
      Parameters
      ----------
      deg : int
          Number of sample points and weights. It must be >= 1.
  
      Returns
      -------
      x : ndarray
          1-D ndarray containing the sample points.
      y : ndarray
          1-D ndarray containing the weights.
  
      Notes
      -----
  
      .. versionadded:: 1.7.0
  
      The results have only been tested up to degree 100, higher degrees may
      be problematic. For Gauss-Chebyshev there are closed form solutions for
      the sample points and weights. If n = `deg`, then
  
      .. math:: x_i = \\cos(\\pi (2 i - 1) / (2 n))
  
      .. math:: w_i = \\pi / n
  
      """
      ideg = pu._deprecate_as_int(deg, "deg")
      if ideg <= 0:
          raise ValueError("deg must be a positive integer")
  
      x = np.cos(np.pi * np.arange(1, 2*ideg, 2) / (2.0*ideg))
      w = np.ones(ideg)*(np.pi/ideg)
  
      return x, w
function_tokens: def chebgauss ( deg ) : ideg = pu . _deprecate_as_int ( deg , "deg" ) if ideg <= 0 : raise ValueError ( "deg must be a positive integer" ) x = np . cos ( np . pi * np . arange ( 1 , 2 * ideg , 2 ) / ( 2.0 * ideg ) ) w = np . ones ( ideg ) * ( np . pi / ideg ) return x , w