def _roots_hermite_asy(n):
 iv = _initial_nodes(n)
 (nodes, weights) = _newton(n, iv)
 if ((n % 2) == 0):
  nodes = hstack([(- nodes[::(-1)]), nodes])
  weights = hstack([weights[::(-1)], weights])
 else:
  nodes = hstack([(- nodes[(-1):0:(-1)]), nodes])
  weights = hstack([weights[(-1):0:(-1)], weights])
 weights *= (sqrt(pi) / sum(weights))
 return (nodes, weights)

def _roots_hermite_asy ( n ) : iv = _initial_nodes ( n ) ( nodes , weights ) = _newton ( n , iv ) if ( ( n % 2 ) == 0 ) : nodes = hstack ( [ ( - nodes [ : : ( - 1 ) ] ) , nodes ] ) weights = hstack ( [ weights [ : : ( - 1 ) ] , weights ] ) else : nodes = hstack ( [ ( - nodes [ ( - 1 ) : 0 : ( - 1 ) ] ) , nodes ] ) weights = hstack ( [ weights [ ( - 1 ) : 0 : ( - 1 ) ] , weights ] ) weights *= ( sqrt ( pi ) / sum ( weights ) ) return ( nodes , weights )
gauss-hermite quadrature for large n .