comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/random/__init__.py @ 87:2a2c65a20a8b

Add Python libs and headers
author Chris Cannam
date Wed, 25 Feb 2015 14:05:22 +0000
parents
children
comparison
equal deleted inserted replaced
86:413a9d26189e 87:2a2c65a20a8b
1 """
2 ========================
3 Random Number Generation
4 ========================
5
6 ==================== =========================================================
7 Utility functions
8 ==============================================================================
9 random Uniformly distributed values of a given shape.
10 bytes Uniformly distributed random bytes.
11 random_integers Uniformly distributed integers in a given range.
12 random_sample Uniformly distributed floats in a given range.
13 random Alias for random_sample
14 ranf Alias for random_sample
15 sample Alias for random_sample
16 choice Generate a weighted random sample from a given array-like
17 permutation Randomly permute a sequence / generate a random sequence.
18 shuffle Randomly permute a sequence in place.
19 seed Seed the random number generator.
20 ==================== =========================================================
21
22 ==================== =========================================================
23 Compatibility functions
24 ==============================================================================
25 rand Uniformly distributed values.
26 randn Normally distributed values.
27 ranf Uniformly distributed floating point numbers.
28 randint Uniformly distributed integers in a given range.
29 ==================== =========================================================
30
31 ==================== =========================================================
32 Univariate distributions
33 ==============================================================================
34 beta Beta distribution over ``[0, 1]``.
35 binomial Binomial distribution.
36 chisquare :math:`\\chi^2` distribution.
37 exponential Exponential distribution.
38 f F (Fisher-Snedecor) distribution.
39 gamma Gamma distribution.
40 geometric Geometric distribution.
41 gumbel Gumbel distribution.
42 hypergeometric Hypergeometric distribution.
43 laplace Laplace distribution.
44 logistic Logistic distribution.
45 lognormal Log-normal distribution.
46 logseries Logarithmic series distribution.
47 negative_binomial Negative binomial distribution.
48 noncentral_chisquare Non-central chi-square distribution.
49 noncentral_f Non-central F distribution.
50 normal Normal / Gaussian distribution.
51 pareto Pareto distribution.
52 poisson Poisson distribution.
53 power Power distribution.
54 rayleigh Rayleigh distribution.
55 triangular Triangular distribution.
56 uniform Uniform distribution.
57 vonmises Von Mises circular distribution.
58 wald Wald (inverse Gaussian) distribution.
59 weibull Weibull distribution.
60 zipf Zipf's distribution over ranked data.
61 ==================== =========================================================
62
63 ==================== =========================================================
64 Multivariate distributions
65 ==============================================================================
66 dirichlet Multivariate generalization of Beta distribution.
67 multinomial Multivariate generalization of the binomial distribution.
68 multivariate_normal Multivariate generalization of the normal distribution.
69 ==================== =========================================================
70
71 ==================== =========================================================
72 Standard distributions
73 ==============================================================================
74 standard_cauchy Standard Cauchy-Lorentz distribution.
75 standard_exponential Standard exponential distribution.
76 standard_gamma Standard Gamma distribution.
77 standard_normal Standard normal distribution.
78 standard_t Standard Student's t-distribution.
79 ==================== =========================================================
80
81 ==================== =========================================================
82 Internal functions
83 ==============================================================================
84 get_state Get tuple representing internal state of generator.
85 set_state Set state of generator.
86 ==================== =========================================================
87
88 """
89 from __future__ import division, absolute_import, print_function
90
91 import warnings
92
93 # To get sub-modules
94 from .info import __doc__, __all__
95
96
97 with warnings.catch_warnings():
98 warnings.filterwarnings("ignore", message="numpy.ndarray size changed")
99 from .mtrand import *
100
101 # Some aliases:
102 ranf = random = sample = random_sample
103 __all__.extend(['ranf', 'random', 'sample'])
104
105 def __RandomState_ctor():
106 """Return a RandomState instance.
107
108 This function exists solely to assist (un)pickling.
109
110 Note that the state of the RandomState returned here is irrelevant, as this function's
111 entire purpose is to return a newly allocated RandomState whose state pickle can set.
112 Consequently the RandomState returned by this function is a freshly allocated copy
113 with a seed=0.
114
115 See https://github.com/numpy/numpy/issues/4763 for a detailed discussion
116
117 """
118 return RandomState(seed=0)
119
120 from numpy.testing import Tester
121 test = Tester().test
122 bench = Tester().bench