summaryrefslogtreecommitdiff
path: root/numpy/random/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random/__init__.py')
-rw-r--r--numpy/random/__init__.py33
1 files changed, 16 insertions, 17 deletions
diff --git a/numpy/random/__init__.py b/numpy/random/__init__.py
index 21c1adddf..6543161f2 100644
--- a/numpy/random/__init__.py
+++ b/numpy/random/__init__.py
@@ -16,7 +16,6 @@ integers Uniformly distributed integers, replaces ``randint``
bytes Uniformly distributed random bytes.
permutation Randomly permute a sequence / generate a random sequence.
shuffle Randomly permute a sequence in place.
-seed Seed the random number generator.
choice Random sample from 1-D array.
==================== =========================================================
@@ -32,6 +31,7 @@ random_integers Uniformly distributed integers in a given range.
(deprecated, use ``integers(..., closed=True)`` instead)
random_sample Alias for `random_sample`
randint Uniformly distributed integers in a given range
+seed Seed the legacy random number generator.
==================== =========================================================
==================== =========================================================
@@ -98,13 +98,15 @@ set_state Set state of generator.
BitGenerator Streams that work with Generator
--------------------------------------------- ---
MT19937
-DSFMT
-PCG32
PCG64
Philox
-ThreeFry
-Xoshiro256
-Xoshiro512
+SFC64
+============================================= ===
+
+============================================= ===
+Getting entropy to initialize a BitGenerator
+--------------------------------------------- ---
+SeedSequence
============================================= ===
"""
@@ -165,19 +167,16 @@ __all__ = [
from . import mtrand
from .mtrand import *
-from .dsfmt import DSFMT
from .generator import Generator
+from .bit_generator import SeedSequence
from .mt19937 import MT19937
-from .pcg32 import PCG32
from .pcg64 import PCG64
from .philox import Philox
-from .threefry import ThreeFry
-from .xoshiro256 import Xoshiro256
-from .xoshiro512 import Xoshiro512
+from .sfc64 import SFC64
from .mtrand import RandomState
-__all__ += ['Generator', 'DSFMT', 'MT19937', 'Philox', 'PCG64', 'PCG32',
- 'ThreeFry', 'Xoshiro256', 'Xoshiro512', 'RandomState']
+__all__ += ['Generator', 'RandomState', 'SeedSequence', 'MT19937',
+ 'Philox', 'PCG64', 'SFC64']
def __RandomState_ctor():
@@ -185,10 +184,10 @@ def __RandomState_ctor():
This function exists solely to assist (un)pickling.
- Note that the state of the RandomState returned here is irrelevant, as this function's
- entire purpose is to return a newly allocated RandomState whose state pickle can set.
- Consequently the RandomState returned by this function is a freshly allocated copy
- with a seed=0.
+ Note that the state of the RandomState returned here is irrelevant, as this
+ function's entire purpose is to return a newly allocated RandomState whose
+ state pickle can set. Consequently the RandomState returned by this function
+ is a freshly allocated copy with a seed=0.
See https://github.com/numpy/numpy/issues/4763 for a detailed discussion