Skip to content

Conversation

@WarrenWeckesser
Copy link
Member

There was a mistake in the code that generated
the plot in the zipf docstring. The Riemann
zeta function is scipy.special.zeta, not
scipy.special.zetac.

I also tweaked the sample parameters and the plot
code so the plot is a bit more informative.

There was a mistake in the code that generated
the plot in the zipf docstring.  The Riemann
zeta function is `scipy.special.zeta`, not
`scipy.special.zetac`.

I also tweaked the sample parameters and the plot
code so the plot is a bit more informative.
@WarrenWeckesser
Copy link
Member Author

The updated docstring with the new plot is at numpy.random.Generator.zip (PR) (compare to numpy.random.Generator.zip (main)).

The TravisCI failures are stalled builds or git issues not related to this PR, and it looks like the other failures are also unrelated and will be fixed by #20347.

@bashtage
Copy link
Contributor

Definite improvement.

@melissawm
Copy link
Member

Should this also be fixed in the numpy.random.zipf docstring? Looks like it was just copied over

@WarrenWeckesser
Copy link
Member Author

@melissawm, I pushed a change that updates RandomState.zipf.

I also fixed the docs where they said zipf was a continuous distribution, and tweaked the math markup to use k instead of x, to be consistent with (some of) the other discrete distributions.

@melissawm
Copy link
Member

I only pushed a tiny formatting nit - thanks @WarrenWeckesser !

@melissawm melissawm merged commit 2513620 into numpy:main Nov 11, 2021
@WarrenWeckesser
Copy link
Member Author

Thanks @melissawm!

@WarrenWeckesser WarrenWeckesser deleted the zipf-example branch November 11, 2021 20:48
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.

3 participants