8000 DOC: np.random documentation cleanup and expansion. by rkern · Pull Request #13849 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: np.random documentation cleanup and expansion. #13849

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 9 commits into from
Jun 28, 2019

Conversation

rkern
Copy link
Member
@rkern rkern commented Jun 27, 2019

I've corrected some errors, filled in some gaps, and extended some of the commentary.

@rkern rkern requested a review from mattip June 27, 2019 07:45
@rkern rkern added this to the 1.17.0 release milestone Jun 27, 2019
from numpy.random import Generator, PCG64
rg = Generator(PCG64())
from numpy.random import default_gen
rg = default_gen(12345)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. This depends on #13840

@charris
Copy link
Member
charris commented Jun 27, 2019

Test failure looks unrelated.

@wkschwartz
Copy link

According to #13829 (comment) mtrand.pyx is closed for new features. This wasn't obvious to the author of #13829 (the changes to mtrand.pyx have since been removed), and maybe this won't be obvious to future contributors either. A comment at the top of mtrand.pyx saying, as the referenced comment said, that

This file is frozen and cannot be changed except for issues relating to compilation, not features or bugs.

would help forestall PRs with unacceptable changes

@charris
Copy link
Member
charris commented Jun 27, 2019

Does this supersede #13675?

@rkern
Copy link
Member Author
rkern commented Jun 27, 2019

Yes.


.. [1] The algorithm is carefully designed to eliminate a number of possible
ways to collide. For example, if one only does one level of spawning, it
is guaranteed that all states will be unique. But it's easier to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, here is the guarantee. Stream of comments...

estimate the naive upper bound on a napkin and take comfort knowing
that the probability is actually lower.

.. [2] In this calculation, we can ignore the amount of numbers drawn from each
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same "ahh" here. Should do a review.

@bashtage
Copy link
Contributor

LGTM. Minor comments that were mostly already addressed.

mattip and others added 4 commits June 27, 2019 15:36
DOC: fix reference links
Also, make the jump step odd to make it a proper Weyl generator. No, this will
never, ever, ever, ever matter. But it feels nicer.
"""
step = 0x9e3779b97f4a7c15f39cc0605cedc834
step = 0x9e3779b97f4a7c15f39cc0605cedc835
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need a LGTM on this one last non-trivial bit, then we can merge this. @bashtage ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to round it which ever way that you prefer. LGTM.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your indulgence. :-)

@rkern
Copy link
Member Author
rkern commented Jun 28, 2019

@charris This is ready to go once the last CI finishes.

@charris charris merged commit 588310c into numpy:master Jun 28, 2019
@charris
Copy link
Member
charris commented Jun 28, 2019

Thanks Robert.

@rkern rkern deleted the doc/random-cleanups branch June 28, 2019 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0