-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
DOC: stats: documentation is not distribution-specific #10328
Comments
I believe that the poster's Issue is referring to a |
The docstring for |
@pvanmulbregt, yes, It would be great if we could get rid of those generic docstrings, and have the docstrings of the method of each distribution actually match the available parameters of that distribution. I think the current style favors developer convenience too much, at the expense of user experience. |
Yes. Also the docstring of the
Yet the second argument, as in SciPy documentation, is defined as the degree of freedom. |
I looked at these |
We closed gh-11578 because it is mostly a duplicate, but when we try to resolve this, we should check not only the rendered documentation, but also the hints provided by IDEs. Currently PyCharm is not showing any useful class-level documentation, whereas Spyder at least shows something generic. It could just be a PyCharm issue, but I suspect that there is a way we can address the issue that will work in all IDEs. |
@Carreau Based on your gh-13458, I wondered if I could interest you in this issue and related issues (gh-11578, gh-12848, gh-9706). The basic problem is that SciPy stats distribution-specific documentation is automatically generated (e.g. norm, chi2) in a way that is not seemless. For instance, users can't click to get distribution-specific documentation for the Their best best is the It would be nice if there were auto-generated, distribution-specific documentation for each method that works just as well as if we had actually written it manually. Any tips? |
That is part of what I have been working on my spare time for the past few month, among other problem related to documentation I want to fix, like having less discrepancies between docs in the terminal/IDE vs sphinx/html – i'm happy to talk about it on one-on-one to get your thoughts. I would have to dive into each of those explicitly. For the signature you might be able to assign |
Well, on my machine the first time I import any Subsequent imports of any subpackage or any functions/classes take microseconds. I'll guess that few people would be bothered if the initial import time were to increase by 10%? Perhaps 50% would be tolerable for most if it were to fix a big issue like this? Please jump in to correct me, anyone : ) |
Let's let this issue cover multivariate distributions (gh-12848), too: the methods documentation of univariate and multivariate distributions does not render properly because each is an instance of a class rather than a class. Hopefully, this can be addressed for both univariate and multivariate distributions in one shot. |
@tirthasheshpatel I think you were trying to make the documentation of distributions more specific, right @tirthasheshpatel? How did it go? |
I was able to link each method's docs of each distribution to a (unique) distribution-specific page. Here it is: tirthasheshpatel#14. Thankfully, we don't need to write an extension from scratch; we can use the autosummary templating mechanism. We need to write docs for each distribution's methods for the change to be useful, otherwise, compared to the previous documentation, we no longer document the shape arguments that the methods take: Before: After: |
Awesome! Want me to look into that a bit? I'll submit a PR to your branch. |
Sure! |
Based on our discussion in tirthasheshpatel#14, shall we consider this a wontfix under the current infrastructure? If we have to choose, it is probably more important to show the signature of the methods correctly than to show |
Yes, we can label this wontfix now and come back when we deprecate/remove frozen distribution infrastructure. |
|
Note from @mdhaber: This is a deep issue that is slated to be addressed as part of this project. Before composing a PR related to this issue, please comment below or - even better - consider resolving another open issue!
I think that the docstring of the scipy.stat.mean.cdf "the cumulative distribution function of the mean distribution." doesnot match with the scipy documentation. The documentation page of the
scipy.stats.norm.cdf
indicates that the second argument islocation. Yet, the docstring saying that it is the 3rd argument.
The docstring of the scipt.stats.mean.cdf
Scipy/Numpy/Python version information:
1.2.1 1.16.2 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
The text was updated successfully, but these errors were encountered: