diff options
author | Ross Barnowski <rossbar@berkeley.edu> | 2020-04-25 17:22:09 -0700 |
---|---|---|
committer | Ross Barnowski <rossbar@berkeley.edu> | 2020-04-25 17:22:09 -0700 |
commit | 2817f1aacc6f64de6a2a88aca35141748d306546 (patch) | |
tree | 5cfe7882cccca63f549f15be64bbd2af07f6badf /doc | |
parent | b751304ec2d1781256d53e1c2faa0908b398240d (diff) | |
download | numpy-2817f1aacc6f64de6a2a88aca35141748d306546.tar.gz |
DOC: Moved timeit examples under relevant bullet point.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/reference/random/new-or-different.rst | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/doc/source/reference/random/new-or-different.rst b/doc/source/reference/random/new-or-different.rst index ed55c71bf..1d6b09faf 100644 --- a/doc/source/reference/random/new-or-different.rst +++ b/doc/source/reference/random/new-or-different.rst @@ -52,17 +52,7 @@ And in more detail: methods which are 2-10 times faster than NumPy's default implementation in `~.Generator.standard_normal`, `~.Generator.standard_exponential` or `~.Generator.standard_gamma`. -* `~.Generator.integers` is now the canonical way to generate integer - random numbers from a discrete uniform distribution. The ``rand`` and - ``randn`` methods are only available through the legacy `~.RandomState`. - This replaces both ``randint`` and the deprecated ``random_integers``. -* The Box-Muller method used to produce NumPy's normals is no longer available. -* All bit generators can produce doubles, uint64s and - uint32s via CTypes (`~PCG64.ctypes`) and CFFI (`~PCG64.cffi`). - This allows these bit generators to be used in numba. -* The bit generators can be used in downstream projects via - Cython. - + .. ipython:: python @@ -82,6 +72,17 @@ And in more detail: %timeit -n 1 rg.standard_gamma(3.0, 100000) %timeit -n 1 numpy.random.standard_gamma(3.0, 100000) + +* `~.Generator.integers` is now the canonical way to generate integer + random numbers from a discrete uniform distribution. The ``rand`` and + ``randn`` methods are only available through the legacy `~.RandomState`. + This replaces both ``randint`` and the deprecated ``random_integers``. +* The Box-Muller method used to produce NumPy's normals is no longer available. +* All bit generators can produce doubles, uint64s and + uint32s via CTypes (`~PCG64.ctypes`) and CFFI (`~PCG64.cffi`). + This allows these bit generators to be used in numba. +* The bit generators can be used in downstream projects via + Cython. * Optional ``dtype`` argument that accepts ``np.float32`` or ``np.float64`` to produce either single or double prevision uniform random variables for select distributions |