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

RandomState.rayleigh()

RandomState.rayleigh(scale=1.0, size=None) Draw samples from a Rayleigh distribution. The and Weibull distributions are generalizations of the Rayleigh. Parameters: scale : scalar Scale, also equals the mode. 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. Notes The probability density function for the Rayleigh distribution is

RandomState.random_sample()

RandomState.random_sample(size=None) Return random floats in the half-open interval [0.0, 1.0). Results are from the ?continuous uniform? distribution over the stated interval. To sample multiply the output of random_sample by (b-a) and add a: (b - a) * random_sample() + a 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 : fl

RandomState.random_integers()

RandomState.random_integers(low, high=None, size=None) Random integers of type np.int between low and high, inclusive. Return random integers of type np.int from the ?discrete uniform? distribution in the closed interval [low, high]. If high is None (the default), then results are from [1, low]. The np.int type translates to the C long type used by Python 2 for ?short? integers and its precision is platform dependent. This function has been deprecated. Use randint instead. Deprecated since

RandomState.randn()

RandomState.randn(d0, d1, ..., dn) Return a sample (or samples) from the ?standard normal? distribution. If positive, int_like or int-convertible arguments are provided, randn generates an array of shape (d0, d1, ..., dn), filled with random floats sampled from a univariate ?normal? (Gaussian) distribution of mean 0 and variance 1 (if any of the are floats, they are first converted to integers by truncation). A single float randomly sampled from the distribution is returned if no argument

RandomState.randint()

RandomState.randint(low, high=None, size=None, dtype='l') Return random integers from low (inclusive) to high (exclusive). Return random integers from the ?discrete uniform? distribution of the specified dtype in the ?half-open? interval [low, high). If high is None (the default), then results are from [0, low). Parameters: low : int Lowest (signed) integer to be drawn from the distribution (unless high=None, in which case this parameter is the highest such integer). high : int, optional

RandomState.rand()

RandomState.rand(d0, d1, ..., dn) Random values in a given shape. Create an array of the given shape and populate it with random samples from a uniform distribution over [0, 1). Parameters: d0, d1, ..., dn : int, optional The dimensions of the returned array, should all be positive. If no argument is given a single Python float is returned. Returns: out : ndarray, shape (d0, d1, ..., dn) Random values. See also random Notes This is a convenience function. If you want an interface

RandomState.power()

RandomState.power(a, size=None) Draws samples in [0, 1] from a power distribution with positive exponent a - 1. Also known as the power function distribution. Parameters: a : float parameter, > 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 The returned samples lie in [0, 1]. Raises: ValueError If a &l

RandomState.poisson()

RandomState.poisson(lam=1.0, size=None) Draw samples from a Poisson distribution. The Poisson distribution is the limit of the binomial distribution for large N. Parameters: lam : float or sequence of float Expectation of interval, should be >= 0. A sequence of expectation intervals must be broadcastable over the requested size. 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

RandomState.permutation()

RandomState.permutation(x) Randomly permute a sequence, or return a permuted range. If x is a multi-dimensional array, it is only shuffled along its first index. Parameters: x : int or array_like If x is an integer, randomly permute np.arange(x). If x is an array, make a copy and shuffle the elements randomly. Returns: out : ndarray Permuted sequence or array range. Examples >>> np.random.permutation(10) array([1, 7, 4, 3, 0, 9, 2, 5, 8, 6]) >>> np.random.permutat