Skip to content

Commit fd9c111

Browse files
committed
DOC: Fix small doc errors
Fix small doc/presentation errors
1 parent 6188349 commit fd9c111

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

doc/source/change-log.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ Since Version 1.13
1515
import numpy as np
1616
import randomstate as rs
1717
rs.seed(23456)
18-
rs.standard_gamma(3, method='zig') # New method
19-
20-
rs.standard_gamma(3, method='inv') # Old method
18+
rs.standard_gamma(2, size=3, method='zig') # New method
19+
rs.standard_gamma(2, size=3, method='inv') # Old method
2120
2221
* Add Ziggurat generator for standard exponential
2322
(:meth:`~randomstate.prng.mt19937.standard_exponential`) for both floats and
@@ -29,7 +28,6 @@ Since Version 1.13
2928
import randomstate as rs
3029
rs.seed(23456)
3130
rs.standard_exponential(3, method='zig') # New method
32-
3331
rs.standard_exponential(3, method='inv') # Old method
3432
3533
* Add SIMD-oriented Fast Mersenne Twister
@@ -80,7 +78,6 @@ Version 1.11.2
8078
import randomstate as rs
8179
rs.seed(23456)
8280
rs.random_sample(3, dtype=np.float64)
83-
8481
rs.seed(23456)
8582
rs.random_sample(3, dtype=np.float32)
8683

doc/source/index.rst

+17-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@ What's New or Different
1818

1919
.. ipython:: python
2020
21-
from randomstate import standard_normal, standard_exponential
22-
x = standard_normal(100000, method='zig')
23-
y = standard_exponential(100000, method='zig')
24-
z = standard_gamma(100000, method='zig')
21+
from randomstate.prng.xoroshiro128plus import standard_normal
22+
%timeit standard_normal(1000000, method='bm')
23+
%timeit standard_normal(1000000, method='zig')
24+
25+
.. ipython:: python
26+
27+
from randomstate.prng.xoroshiro128plus import standard_exponential
28+
%timeit standard_exponential(1000000, method='inv')
29+
%timeit standard_exponential(1000000, method='zig')
30+
31+
.. ipython:: python
32+
33+
from randomstate.prng.xoroshiro128plus import standard_gamma
34+
%timeit standard_gamma(3.0, 1000000, method='inv')
35+
%timeit standard_gamma(3.0, 1000000, method='zig')
2536
2637
* Optional ``dtype`` argument that accepts ``np.float32`` or ``np.float64``
2738
to produce either single or double prevision uniform random variables for
@@ -34,12 +45,11 @@ What's New or Different
3445

3546
.. ipython:: python
3647
37-
import numpy as np
3848
import randomstate as rs
3949
rs.seed(0)
40-
rs.random_sample(3, dtype=np.float64)
50+
rs.random_sample(3, dtype='d')
4151
rs.seed(0)
42-
rs.random_sample(3, dtype=np.float32)
52+
rs.random_sample(3, dtype='f')
4353
4454
* Optional ``out`` argument that allows existing arrays to be filled for
4555
select distributions

0 commit comments

Comments
 (0)