Random Number Generator
Project description
Random Number Package
random number generator
This module implement random number from the specified distribution.
Real-valued distributions
The following functions generate specific real-valued distributions. Function parameters are named after the corresponding variables in the distribution’s equation.
-
uniform(size)
Return the 'size random floating point numbers in the range [0.0, 1.0).
-
gaussian(size)
-
binomial(trials,probability,size)
return samples from a binomial distribution, where each sample is equal to the number of successes over the n trials.
-
chisquare(df,size)
return samples from a chi-square distribution. Parameters:
a. df : int or array_like of ints;Number of degrees of freedom. b. size : int or tuple of ints, Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if df is a scalar. Otherwise, np.array(df).size samples are drawn. -
weibull(size) return samples from a Weibull distribution. Parameters: a : float or array_like of floats Shape of the distribution. Should be greater than zero. 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. If size is None (default), a single value is returned if a is a scalar. Otherwise, np.array(a).size samples are drawn.
-
exponential(scale,size) return samples from an exponential distribution. Parameters: scale : float or array_like of floats The scale parameter, \beta = 1/\lambda. 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. If size is None (default), a single value is returned if scale is a scalar. Otherwise, np.array(scale).size samples are drawn.
-
poisson(lam,size) return samples from a poisson distribution. Parameters: lam : float or array_like of floats 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. If size is None (default), a single value is returned if lam is a scalar. Otherwise, np.array(lam).size samples are drawn.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rand_number_gen-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54794c3c9d51e211d24a33e23c9e164400b3b0e0326810d1433d0e277fdf57e7 |
|
MD5 | c77324f93b935c8c834deb372a00fd88 |
|
BLAKE2b-256 | a2dda3eacf28604c63486e1ef718758029cb1827e9f4b42778780fa68c88e557 |