RandomState.uniform()

RandomState.uniform(low=0.0, high=1.0, size=None) Draw samples from a uniform distribution. Samples are uniformly distributed over the half-open interval [low, high) (includes low, but excludes high). In other words, any value within the given interval is equally likely to be drawn by uniform. Parameters: low : float, optional Lower boundary of the output interval. All values generated will be greater than or equal to low. The default value is 0. high : float Upper boundary of the outpu

RandomState.triangular()

RandomState.triangular(left, mode, right, size=None) Draw samples from the triangular distribution. The triangular distribution is a continuous probability distribution with lower limit left, peak at mode, and upper limit right. Unlike the other distributions, these parameters directly define the shape of the pdf. Parameters: left : scalar Lower limit. mode : scalar The value where the peak of the distribution occurs. The value should fulfill the condition left <= mode <= right.

RandomState.tomaxint()

RandomState.tomaxint(size=None) Random integers between 0 and sys.maxint, inclusive. Return a sample of uniformly distributed random integers in the interval [0, sys.maxint]. Parameters: size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. Returns: out : ndarray Drawn samples, with shape size. See also randint Uniform sampling over a given half-open

RandomState.standard_t()

RandomState.standard_t(df, size=None) Draw samples from a standard Student?s t distribution with df degrees of freedom. A special case of the hyperbolic distribution. As df gets large, the result resembles that of the standard normal distribution (standard_normal). Parameters: df : int Degrees of freedom, should be > 0. size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single

RandomState.standard_normal()

RandomState.standard_normal(size=None) Draw samples from a standard Normal distribution (mean=0, stdev=1). Parameters: size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. Returns: out : float or ndarray Drawn samples. Examples >>> s = np.random.standard_normal(8000) >>> s array([ 0.6888893 , 0.78096262, -0.89086505, ..., 0.49876311,

RandomState.standard_gamma()

RandomState.standard_gamma(shape, size=None) Draw samples from a standard Gamma distribution. Samples are drawn from a Gamma distribution with specified parameters, shape (sometimes designated ?k?) and scale=1. Parameters: shape : float Parameter, should be > 0. size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. Returns: samples : ndarray or scalar

RandomState.standard_exponential()

RandomState.standard_exponential(size=None) Draw samples from the standard exponential distribution. standard_exponential is identical to the exponential distribution with a scale parameter of 1. Parameters: size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. Returns: out : float or ndarray Drawn samples. Examples Output a 3x8000 array: >>> n

RandomState.standard_cauchy()

RandomState.standard_cauchy(size=None) Draw samples from a standard Cauchy distribution with mode = 0. Also known as the Lorentz distribution. Parameters: size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. Returns: samples : ndarray or scalar The drawn samples. Notes The probability density function for the full Cauchy distribution is and the Stand

RandomState.shuffle()

RandomState.shuffle(x) Modify a sequence in-place by shuffling its contents. Parameters: x : array_like The array or list to be shuffled. Returns: None Examples >>> arr = np.arange(10) >>> np.random.shuffle(arr) >>> arr [1 7 5 2 9 4 3 6 0 8] This function only shuffles the array along the first index of a multi-dimensional array: >>> arr = np.arange(9).reshape((3, 3)) >>> np.random.shuffle(arr) >>> arr array([[3, 4, 5], [6,

RandomState.set_state()

RandomState.set_state(state) Set the internal state of the generator from a tuple. For use if one has reason to manually (re-)set the internal state of the ?Mersenne Twister?[R190] pseudo-random number generating algorithm. Parameters: state : tuple(str, ndarray of 624 uints, int, int, float) The state tuple has the following items: the string ?MT19937?, specifying the Mersenne Twister algorithm. a 1-D array of 624 unsigned integers keys. an integer pos. an integer has_gauss. a float cach