summaryrefslogtreecommitdiff
path: root/doc/source/reference/random
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/reference/random')
-rw-r--r--doc/source/reference/random/index.rst26
-rw-r--r--doc/source/reference/random/new-or-different.rst8
2 files changed, 27 insertions, 7 deletions
diff --git a/doc/source/reference/random/index.rst b/doc/source/reference/random/index.rst
index 51e72513d..7de1c838c 100644
--- a/doc/source/reference/random/index.rst
+++ b/doc/source/reference/random/index.rst
@@ -41,10 +41,28 @@ statistically more reliable than the legacy methods in `~.RandomState`
from numpy import random
random.standard_normal()
-`~Generator` can be used as a direct replacement for `~.RandomState`, although
-the random values are generated by `~.PCG64`. The
-`~Generator` holds an instance of a BitGenerator. It is accessible as
-``gen.bit_generator``.
+`~Generator` can be used as a replacement for `~.RandomState`. Both class
+instances now hold a internal `BitGenerator` instance to provide the bit
+stream, it is accessible as ``gen.bit_generator``. Some long-overdue API
+cleanup means that legacy and compatibility methods have been removed from
+`~.Generator`
+
+=================== ============== ============
+`~.RandomState` `~.Generator` Notes
+------------------- -------------- ------------
+``random_sample``, ``random`` Compatible with `random.random`
+``rand``
+------------------- -------------- ------------
+``randint``, ``integers`` Add an ``endpoint`` kwarg
+``random_integers``
+------------------- -------------- ------------
+``tomaxint`` removed Use ``integers(0, np.iinfo(np.int).max,``
+ ``endpoint=False)``
+------------------- -------------- ------------
+``seed`` removed Use `~.SeedSequence.spawn`
+=================== ============== ============
+
+See `new-or-different` for more information
.. code-block:: python
diff --git a/doc/source/reference/random/new-or-different.rst b/doc/source/reference/random/new-or-different.rst
index 4eb175d57..5442f46c9 100644
--- a/doc/source/reference/random/new-or-different.rst
+++ b/doc/source/reference/random/new-or-different.rst
@@ -23,10 +23,12 @@ Feature Older Equivalent Notes
source, called a `BitGenerator
<bit_generators>` A number of these
are provided. ``RandomState`` uses
- only the Mersenne Twister.
+ the Mersenne Twister `~.MT19937` by
+ default, but can also be instantiated
+ with any BitGenerator.
------------------ -------------------- -------------
-``random`` ``random_sample`` Access the values in a BitGenerator,
- convert them to ``float64`` in the
+``random`` ``random_sample``, Access the values in a BitGenerator,
+ ``rand`` convert them to ``float64`` in the
interval ``[0.0.,`` `` 1.0)``.
In addition to the ``size`` kwarg, now
supports ``dtype='d'`` or ``dtype='f'``,