def qnwunif(n, a, b):
 (n, a, b) = list(map(np.asarray, [n, a, b]))
 (nodes, weights) = qnwlege(n, a, b)
 weights = (weights / np.prod((b - a)))
 return (nodes, weights)

def qnwunif ( n , a , b ) : ( n , a , b ) = list ( map ( np . asarray , [ n , a , b ] ) ) ( nodes , weights ) = qnwlege ( n , a , b ) weights = ( weights / np . prod ( ( b - a ) ) ) return ( nodes , weights )
computes quadrature nodes and weights for multivariate uniform distribution parameters n : int or array_like a length-d iterable of the number of nodes in each dimension a : scalar or array_like a length-d iterable of lower endpoints .