@@ -22,22 +22,24 @@ z = rnd.randn(10,10)
22
22
* Default random generator is identical to NumPy's RandomState (i.e.,
23
23
same seed, same random numbers).
24
24
* Support for random number generators that support independent streams
25
- and jumping ahead so that substreams can be generated
26
- * Faster random number generation, especially for Normals using the
27
- Ziggurat method
25
+ and jumping ahead so that sub-streams can be generated
26
+ * Faster random number generation, especially for normal, standard
27
+ exponential and standard gamma using the Ziggurat method
28
28
29
29
``` python
30
30
import randomstate as rnd
31
31
w = rnd.standard_normal(10000 , method = ' zig' )
32
+ x = rnd.standard_exponential(10000 , method = ' zig' )
33
+ y = rnd.standard_gamma(5.5 , 10000 , method = ' zig' )
32
34
```
33
35
34
36
* Support for 32-bit floating randoms for core generators.
35
37
Currently supported:
36
38
37
39
* Uniforms (` random_sample ` )
38
- * Exponentials (` standard_exponential ` )
40
+ * Exponentials (` standard_exponential ` , both Inverse CDF and Ziggurat)
39
41
* Normals (` standard_normal ` , both Box-Muller and Ziggurat)
40
- * Standard Gammas (via ` standard_gamma ` )
42
+ * Standard Gammas (via ` standard_gamma ` , both Inverse CDF and Ziggurat)
41
43
42
44
** WARNING** : The 32-bit generators are ** experimental** and subject
43
45
to change.
@@ -64,7 +66,10 @@ The RNGs include:
64
66
* [ dSFMT] ( http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/ ) a
65
67
SSE2-aware version of the MT19937 generator that is especially fast at
66
68
generating doubles
67
- * [ xorshift128+] ( http://xorshift.di.unimi.it/ ) ,
69
+ * [ SFMT] ( http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/ ) a
70
+ SSE2-aware version of the MT19937 generator that is optimized for
71
+ integer values
72
+ * [ xorshift128+] ( http://xorshift.di.unimi.it/ ) ,
68
73
[ xoroshiro128+] ( http://xoroshiro.di.unimi.it/ ) and
69
74
[ xorshift1024* ] ( http://xorshift.di.unimi.it/ )
70
75
* [ PCG32] ( http://www.pcg-random.org/ ) and
@@ -76,14 +81,18 @@ The RNGs include:
76
81
77
82
### New Features
78
83
* ` standard_normal ` , ` normal ` , ` randn ` and ` multivariate_normal ` all
79
- support an additional ` method ` keyword argument which can be ` bm ` or
80
- ` zig ` where ` bm ` corresponds to the current method using the Box-Muller
81
- transformation and ` zig ` uses the much faster (100%+) Ziggurat method.
84
+ support an additional ` method ` keyword argument which can be ` bm ` or
85
+ ` zig ` where ` bm ` corresponds to the current method using the Box-Muller
86
+ transformation and ` zig ` uses the much faster (100%+) Ziggurat method.
87
+ * ` standard_exponential ` and ` standard_gamma ` both support an additional
88
+ ` method ` keyword argument which can be ` inv ` or
89
+ ` zig ` where ` inv ` corresponds to the current method using the inverse
90
+ CDF and ` zig ` uses the much faster (100%+) Ziggurat method.
82
91
* Core random number generators can produce either single precision
83
- (` np.float32 ` ) or double precision (` np.float64 ` , the default) using
84
- an the optional keyword argument ` dtype `
92
+ (` np.float32 ` ) or double precision (` np.float64 ` , the default) using
93
+ an the optional keyword argument ` dtype `
85
94
* Core random number generators can fill existing arrays using the
86
- ` out ` keyword argument
95
+ ` out ` keyword argument
87
96
88
97
89
98
### New Functions
@@ -110,8 +119,8 @@ will produce an identical sequence of random numbers for a given seed.
110
119
* Linux 32/64 bit, Python 2.7, 3.4, 3.5, 3.6 (probably works on 2.6 and 3.3)
111
120
* PC-BSD (FreeBSD) 64-bit, Python 2.7
112
121
* OSX 64-bit, Python 2.7
113
- * Windows 32/64 bit (only tested on Python 2.7 and 3.5 , but should
114
- work on 3.3/3.4)
122
+ * Windows 32/64 bit (only tested on Python 2.7, 3.5 and 3.6 , but
123
+ should work on 3.3/3.4)
115
124
116
125
## Version
117
126
The version matched the latest version of NumPy where
@@ -138,7 +147,7 @@ Building requires:
138
147
* Cython (0.22, 0.23, 0.24, 0.25)
139
148
* tempita (0.5+), if not provided by Cython
140
149
141
- Testing requires nose (1.3 +).
150
+ Testing requires pytest (3.0 +).
142
151
143
152
** Note:** it might work with other versions but only tested with these
144
153
versions.
0 commit comments