@@ -1112,7 +1112,7 @@ cdef class RandomState:
11121112
11131113 def randn (self , * args , method = __normal_method ):
11141114 """
1115- randn(d0, d1, ..., dn)
1115+ randn(d0, d1, ..., dn, method='inv' )
11161116
11171117 Return a sample (or samples) from the "standard normal" distribution.
11181118
@@ -1132,6 +1132,9 @@ cdef class RandomState:
11321132 d0, d1, ..., dn : int, optional
11331133 The dimensions of the returned array, should be all positive.
11341134 If no argument is given a single Python float is returned.
1135+ method : str, optional
1136+ Either 'inv' or 'zig'. 'inv' uses the default FIXME method. 'zig' uses
1137+ the much faster ziggurat method of FIXME.
11351138
11361139 Returns
11371140 -------
@@ -3674,9 +3677,9 @@ cdef class RandomState:
36743677 0.0 , '' , CONS_NONE )
36753678
36763679 # Multivariate distributions:
3677- def multivariate_normal (self , mean , cov , size = None ):
3680+ def multivariate_normal (self , mean , cov , size = None , method = __normal_method ):
36783681 """
3679- multivariate_normal(mean, cov[ , size] )
3682+ multivariate_normal(mean, cov, size=None, method='inv' )
36803683
36813684 Draw random samples from a multivariate normal distribution.
36823685
@@ -3699,6 +3702,9 @@ cdef class RandomState:
36993702 generated, and packed in an `m`-by-`n`-by-`k` arrangement. Because
37003703 each sample is `N`-dimensional, the output shape is ``(m,n,k,N)``.
37013704 If no shape is specified, a single (`N`-D) sample is returned.
3705+ method : str, optional
3706+ Either 'inv' or 'zig'. 'inv' uses the default FIXME method. 'zig' uses
3707+ the much faster ziggurat method of FIXME.
37023708
37033709 Returns
37043710 -------
@@ -3795,7 +3801,7 @@ cdef class RandomState:
37953801 # form a matrix of shape final_shape.
37963802 final_shape = tuple (shape [:])
37973803 final_shape += (mean .shape [0 ],)
3798- x = self .standard_normal (final_shape ).reshape (- 1 , mean .shape [0 ])
3804+ x = self .standard_normal (final_shape , method = method ).reshape (- 1 , mean .shape [0 ])
37993805
38003806 # Transform matrix of standard normals into matrix where each row
38013807 # contains multivariate normals with the desired covariance.
0 commit comments