Version 1.0b1 API Documentation generated by Endo 2006-08-14
ArgumentError = ValueError
F(dfn, dfd) or F(dfn, dfd, [n, m, ...]) returns array of F distributed random numbers with dfn degrees of freedom in the numerator and dfd degrees of freedom in the denominator.
beta(a, b) or beta(a, b, [n, m, ...]) returns array of beta distributed random numbers.
binomial(trials, p) or binomial(trials, p, [n, m, ...]) returns array of binomially distributed random integers.
trials is the number of trials in the binomial distribution. p is the probability of an event in each trial of the binomial distribution.
chi_square(df) or chi_square(df, [n, m, ...]) returns array of chi squared distributed random numbers with df degrees of freedom.
exponential(mean, n) or exponential(mean, [n, m, ...]) returns array of random numbers exponentially distributed with specified mean
gamma(a, r) or gamma(a, r, [n, m, ...]) returns array of gamma distributed random numbers.
array of multinomial distributed integer vectors.
trials is the number of trials in each multinomial distribution. probs is a one dimensional array. There are len(prob)+1 events. prob[i] is the probability of the i-th event, 0<=i<len(prob). The probability of event len(prob) is 1.-Numeric.sum(prob).
distributed vector.
The second form returns an array of shape (m, n, ..., len(probs)). In this case, output[i,j,...,:] is a 1-D array containing a multinomially distributed integer 1-D array.
multivariate_normal(mean, cov) or multivariate_normal(mean, cov, [m, n, ...]) returns an array containing multivariate normally distributed random numbers with specified mean and covariance.
mean must be a 1 dimensional array. cov must be a square two dimensional array with the same number of rows and columns as mean has elements.
The first form returns a single 1-D array containing a multivariate normal.
The second form returns an array of shape (m, n, ..., cov.shape[0]). In this case, output[i,j,...,:] is a 1-D array containing a multivariate normal.
negative_binomial(trials, p) or negative_binomial(trials, p, [n, m, ...]) returns array of negative binomially distributed random integers.
trials is the number of trials in the negative binomial distribution. p is the probability of an event in each trial of the negative binomial distribution.
noncentral_F(dfn, dfd, nonc) or noncentral_F(dfn, dfd, nonc, [n, m, ...]) returns array of noncentral F distributed random numbers with dfn degrees of freedom in the numerator and dfd degrees of freedom in the denominator, and noncentrality parameter nconc.
noncentral_chi_square(df, nconc) or chi_square(df, nconc, [n, m, ...]) returns array of noncentral chi squared distributed random numbers with df degrees of freedom and noncentrality parameter.
normal(mean, std, n) or normal(mean, std, [n, m, ...]) returns array of random numbers randomly distributed with specified mean and standard deviation
permutation(n) = a permutation of indices range(n)
poisson(mean) or poisson(mean, [n, m, ...]) returns array of poisson distributed random integers with specified mean.
randint(min, max, shape=[]) = random integers >=min, < max If max not given, random integers >= 0, <min
random(n) or random([n, m, ...]) returns array of random numbers
random_integers(max, min=1, shape=[]) = random integers in range min-max inclusive
standard_normal(n) or standard_normal([n, m, ...]) returns array of random numbers normally distributed with mean 0 and standard deviation 1
uniform(minimum, maximum, shape=[]) returns array of given shape of random reals in given range
| Local name | Refers to |
|---|---|
| IntType | types.IntType |
| mt | numpy.random.mtrand |
| Numeric | numpy |