Skip to content

Commit 469bf4c

Browse files
committed
ENH: move code out of numpy.random.randomgen into numpy.random
1 parent 95ee88f commit 469bf4c

File tree

177 files changed

+182
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+182
-743
lines changed
File renamed without changes.

numpy/random/__init__.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@
8383
set_state Set state of generator.
8484
==================== =========================================================
8585
86+
==================== =========================================================
87+
Random Number Streams that work with RandomGenerator
88+
==============================================================================
89+
MT19937
90+
DSFMT
91+
PCG32
92+
PCG64
93+
Philox
94+
ThreeFry
95+
ThreeFry32
96+
Xoroshiro128
97+
Xoroshift1024
98+
Xoshiro256StarStar
99+
Xoshiro512StarStar
100+
==================== =========================================================
101+
86102
"""
87103
from __future__ import division, absolute_import, print_function
88104

@@ -136,8 +152,24 @@
136152
'zipf'
137153
]
138154

139-
from .randomgen import mtrand
140-
from .randomgen.mtrand import *
155+
from . import mtrand
156+
from .mtrand import *
157+
from .dsfmt import DSFMT
158+
from .generator import RandomGenerator
159+
from .mt19937 import MT19937
160+
from .pcg32 import PCG32
161+
from .pcg64 import PCG64
162+
from .philox import Philox
163+
from .threefry import ThreeFry
164+
from .threefry32 import ThreeFry32
165+
from .xoroshiro128 import Xoroshiro128
166+
from .xorshift1024 import Xorshift1024
167+
from .xoshiro256starstar import Xoshiro256StarStar
168+
from .xoshiro512starstar import Xoshiro512StarStar
169+
from .mtrand import RandomState
170+
__all__ += ['RandomGenerator', 'DSFMT', 'MT19937', 'PCG64', 'PCG32', 'Philox',
171+
'ThreeFry', 'ThreeFry32', 'Xoroshiro128', 'Xorshift1024',
172+
'Xoshiro256StarStar', 'Xoshiro512StarStar', 'RandomState']
141173

142174
# Some aliases:
143175
ranf = random = sample = random_sample
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

numpy/random/randomgen/__init__.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)