8000 MAINT: Correct masked aliases · numpy/numpy@68c81c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68c81c1

Browse files
committed
MAINT: Correct masked aliases
Expose alias that have correct docstrings closes #10587
1 parent 392866d commit 68c81c1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

numpy/random/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,12 @@
141141
'rand',
142142
'randint',
143143
'randn',
144+
'random',
144145
'random_integers',
145146
'random_sample',
147+
'ranf',
146148
'rayleigh',
149+
'sample',
147150
'seed',
148151
'set_state',
149152
'shuffle',
@@ -176,10 +179,6 @@
176179
__all__ += ['Generator', 'DSFMT', 'MT19937', 'Philox', 'PCG64', 'PCG32',
177180
'ThreeFry', 'Xoshiro256', 'Xoshiro512', 'RandomState']
178181

179-
# Some aliases:
180-
ranf = random = sample = random_sample
181-
__all__.extend(['ranf', 'random', 'sample'])
182-
183182

184183
def __RandomState_ctor():
185184
"""Return a RandomState instance.

numpy/random/mtrand.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4196,7 +4196,7 @@ power = _rand.power
41964196
rand = _rand.rand
41974197
randint = _rand.randint
41984198
randn = _rand.randn
4199-
random = _rand.random_sample
4199+
random = _rand.random
42004200
random_integers = _rand.random_integers
42014201
random_sample = _rand.random_sample
42024202
rayleigh = _rand.rayleigh
@@ -4261,6 +4261,7 @@ __all__ = [
42614261
'rand',
42624262
'randint',
42634263
'randn',
4264+
'random',
42644265
'random_integers',
42654266
'random_sample',
42664267
'ranf',

0 commit comments

Comments
 (0)
0