Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
The docstring of np.random.pareto (Version 1.8.0) contains multiple critical errors #4181
The docstring of np.random.pareto (Version 1.8.0) contains multiple errors. In a nutshell np.random.pareto does not draw samples from the Pareto distribution shown under 'Notes' in the docstring. Instead it draws samples from a Lomax distribution (also stated in the docstring). However, the description in the docstring of how to convert those Lomax random variates to a Pareto distribution is wrong. Further, the examples are faulty.
More specifically, the docstring says:
Instead, it should read "[..] by adding 1 and multiplying my m, see below."
The example at the bottom therefore should read:
Maybe an example with m=10 makes it clearer
Additionally, calling m the location parameter could be misleading.
Last but not least I think it might also cause confusion to call
I stumbled on this same issue just now. It is a bit sad that it has not been fixed, since it is so simple to do, and can cause quite a large time loss.
The mathematics in teh example are correct, the only thing left to do is to change "s = np.random.pareto(a, 1000) + m" into "s = (np.random.pareto(a, 1000)+1)*m".
Also, one may remove the argument ",align='centered' ", which seems to have become incorrect.
What needs to happen for it to be fixed, is for someone who understands the
On Tue, Jan 6, 2015 at 4:18 PM, F.P. Landes firstname.lastname@example.org
Nathaniel J. Smith
I am not sure if it is relevant here, but if it is just documentation change, you can skip the Travis CI build. All you need to do is to add
Also the commit messages can be documented according to this.
In case you want to close an issue, once the pull request is merged, you can add notes like