np.percentile docstring
In my numpy 1.6.1 (from Ubuntu 12.04LTS repository), the docstring of np.percentile is wrong. I'm not just submitting a PR because I don't understand something. in the "Notes" and "Examples" sections, there seems to be some confusion if ``q`` should be in the range [0,1] or in [0,100]. The parameters section is very clear about this, it should be [0,100]. However, in the Examples section, it says
np.percentile(a, 0.5, axis=0) array([ 6.5, 4.5, 2.5])
The given array is clearly the result of a call to np.percentile(a, 50., axis=0). I thought the docs are auto-generated, and that the "array..." result of the docstring would be calculated by numpy while building the docs? Or am I misunderstanding something here? Cheers, Andreas.
Hey, On Sun, 2013-02-17 at 11:50 +0100, Andreas Hilboll wrote:
In my numpy 1.6.1 (from Ubuntu 12.04LTS repository), the docstring of np.percentile is wrong. I'm not just submitting a PR because I don't understand something.
in the "Notes" and "Examples" sections, there seems to be some confusion if ``q`` should be in the range [0,1] or in [0,100]. The parameters section is very clear about this, it should be [0,100].
However, in the Examples section, it says
np.percentile(a, 0.5, axis=0) array([ 6.5, 4.5, 2.5])
The given array is clearly the result of a call to np.percentile(a, 50., axis=0).
I thought the docs are auto-generated, and that the "array..." result of the docstring would be calculated by numpy while building the docs? Or am I misunderstanding something here?
They are not auto generated, in principle the other way would be possible, i.e. numpy can use the documentation to test the code. But the doctests have been relatively broken for a while I think, so there is at the time no way to automatically find such issues. There is some work right now going on for percentile, but please just do your pull request. Regards, Sebastian
Cheers, Andreas. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (2)
-
Andreas Hilboll
-
Sebastian Berg