8000 MAINT: Correct masked aliases by bashtage · Pull Request #13688 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Correct masked aliases #13688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions numpy/random/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@
'rand',
'randint',
'randn',
'random',
'random_integers',
'random_sample',
'ranf',
'rayleigh',
'sample',
'seed',
'set_state',
'shuffle',
Expand Down Expand Up @@ -176,10 +179,6 @@
__all__ += ['Generator', 'DSFMT', 'MT19937', 'Philox', 'PCG64', 'PCG32',
'ThreeFry', 'Xoshiro256', 'Xoshiro512', 'RandomState']

# Some aliases:
ranf = random = sample = random_sample
__all__.extend(['ranf', 'random', 'sample'])


def __RandomState_ctor():
"""Return a RandomState instance.
Expand Down
3 changes: 2 additions & 1 deletion numpy/random/mtrand.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4196,7 +4196,7 @@ power = _rand.power
rand = _rand.rand
randint = _rand.randint
randn = _rand.randn
random = _rand.random_sample
random = _rand.random
random_integers = _rand.random_integers
random_sample = _rand.random_sample
rayleigh = _rand.rayleigh
Expand Down Expand Up @@ -4261,6 +4261,7 @@ __all__ = [
'rand',
'randint',
'randn',
'random',
'random_integers',
'random_sample',
'ranf',
Expand Down
0