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.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.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.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_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_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_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.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.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.seed()

RandomState.seed(seed=None) Seed the generator. This method is called when RandomState is initialized. It can be called again to re-seed the generator. For details, see RandomState. Parameters: seed : int or array_like, optional Seed for RandomState. Must be convertible to 32 bit unsigned integers. See also RandomState