def roots_chebyt(n, mu=False):
 m = int(n)
 if ((n < 1) or (n != m)):
  raise ValueError('n must be a positive integer.')
 x = np.cos(((np.arange(((2 * m) - 1), 0, (-2)) * pi) / (2 * m)))
 w = np.empty_like(x)
 w.fill((pi / m))
 if mu:
  return (x, w, pi)
 else:
  return (x, w)

def roots_chebyt ( n , mu = False ) : m = int ( n ) if ( ( n < 1 ) or ( n != m ) ) : raise ValueError ( 'n must be a positive integer.' ) x = np . cos ( ( ( np . arange ( ( ( 2 * m ) - 1 ) , 0 , ( - 2 ) ) * pi ) / ( 2 * m ) ) ) w = np . empty_like ( x ) w . fill ( ( pi / m ) ) if mu : return ( x , w , pi ) else : return ( x , w )
gauss-chebyshev quadrature .