def roots_hermitenorm(n, mu=False):
 m = int(n)
 if ((n < 1) or (n != m)):
  raise ValueError('n must be a positive integer.')
 mu0 = np.sqrt((2.0 * np.pi))
 if (n <= 150):
  an_func = (lambda k: (0.0 * k))
  bn_func = (lambda k: np.sqrt(k))
  f = cephes.eval_hermitenorm
  df = (lambda n, x: (n * cephes.eval_hermitenorm((n - 1), x)))
  return _gen_roots_and_weights(m, mu0, an_func, bn_func, f, df, True, mu)
 else:
  (nodes, weights) = _roots_hermite_asy(m)
  nodes *= sqrt(2)
  weights *= sqrt(2)
  if mu:
   return (nodes, weights, mu0)
  else:
   return (nodes, weights)

def roots_hermitenorm ( n , mu = False ) : m = int ( n ) if ( ( n < 1 ) or ( n != m ) ) : raise ValueError ( 'n must be a positive integer.' ) mu0 = np . sqrt ( ( 2.0 * np . pi ) ) if ( n <= 150 ) : an_func = ( lambda k : ( 0.0 * k ) ) bn_func = ( lambda k : np . sqrt ( k ) ) f = cephes . eval_hermitenorm df = ( lambda n , x : ( n * cephes . eval_hermitenorm ( ( n - 1 ) , x ) ) ) return _gen_roots_and_weights ( m , mu0 , an_func , bn_func , f , df , True , mu ) else : ( nodes , weights ) = _roots_hermite_asy ( m ) nodes *= sqrt ( 2 ) weights *= sqrt ( 2 ) if mu : return ( nodes , weights , mu0 ) else : return ( nodes , weights )
gauss-hermite quadrature .