|
3 | 3 | Random Number Generation
|
4 | 4 | ========================
|
5 | 5 |
|
6 |
| -Instantiate a BitGenerator and wrap it in a Generator |
7 |
| -which will convert the uniform stream to a number of distributions. The "bare" |
8 |
| -functions are kept for legacy code, they should be called with the newer API |
9 |
| -via ``np.random.Generator().function`` instead |
| 6 | +Use ``default_gen()`` to create a `Generator` and call its methods. |
| 7 | +
|
| 8 | +=============== ========================================================= |
| 9 | +Generator |
| 10 | +--------------- --------------------------------------------------------- |
| 11 | +Generator Class implementing all of the random number distributions |
| 12 | +default_gen Default constructor for ``Generator`` |
| 13 | +=============== ========================================================= |
| 14 | +
|
| 15 | +============================================= === |
| 16 | +BitGenerator Streams that work with Generator |
| 17 | +--------------------------------------------- --- |
| 18 | +MT19937 |
| 19 | +PCG64 |
| 20 | +Philox |
| 21 | +SFC64 |
| 22 | +============================================= === |
| 23 | +
|
| 24 | +============================================= === |
| 25 | +Getting entropy to initialize a BitGenerator |
| 26 | +--------------------------------------------- --- |
| 27 | +SeedSequence |
| 28 | +============================================= === |
| 29 | +
|
| 30 | +
|
| 31 | +Legacy |
| 32 | +------ |
| 33 | +
|
| 34 | +For backwards compatibility with previous versions of numpy before 1.17, the |
| 35 | +various aliases to the global `RandomState` methods are left alone and do not |
| 36 | +use the new `Generator` API. |
10 | 37 |
|
11 | 38 | ==================== =========================================================
|
12 | 39 | Utility functions
|
13 | 40 | -------------------- ---------------------------------------------------------
|
14 | 41 | random Uniformly distributed floats over ``[0, 1)``
|
15 |
| -integers Uniformly distributed integers, replaces ``randint`` |
16 | 42 | bytes Uniformly distributed random bytes.
|
17 | 43 | permutation Randomly permute a sequence / generate a random sequence.
|
18 | 44 | shuffle Randomly permute a sequence in place.
|
|
94 | 120 | set_state Set state of generator.
|
95 | 121 | ==================== =========================================================
|
96 | 122 |
|
97 |
| -============================================= === |
98 |
| -BitGenerator Streams that work with Generator |
99 |
| ---------------------------------------------- --- |
100 |
| -MT19937 |
101 |
| -PCG64 |
102 |
| -Philox |
103 |
| -SFC64 |
104 |
| -============================================= === |
105 |
| -
|
106 |
| -============================================= === |
107 |
| -Getting entropy to initialize a BitGenerator |
108 |
| ---------------------------------------------- --- |
109 |
| -SeedSequence |
110 |
| -============================================= === |
111 | 123 |
|
112 | 124 | """
|
113 | 125 | from __future__ import division, absolute_import, print_function
|
|
0 commit comments