-
-
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/MAINT: special: Several updates for tklmbda #17267
Conversation
3f01a3f
to
afa2bf0
Compare
Updated docstring: |
afa2bf0
to
02fbb0c
Compare
* Use spaces instead of tabs. * Alway enclose the body of an if statment in braces, even if it is just one line. See PEP 7, https://peps.python.org/pep-0007
* Add "Examples" section. * Add "See Also" section. * Copy-edit a bit.
02fbb0c
to
93e9f9d
Compare
Rebased, and updated the link to the rendered docstring on CircleCI. The segfault in the CirrusCI job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me - out of curiosity, was the missing bounds check creating a bug somewhere?
Also, I noticed both in the tutorial and in the docstring for the Tukey lambda distribution the formatting is still "wrong" (Tukey-Lambda instead of Tukey lambda). I am guessing those fixes can be done in a follow-up - they also look like good first issues :)
Thanks @melissawm.
If we call it a bug, it is not a very serious bug. The differences would only be noticed at the ends of the support of the distribution, and they are tiny. Here are some cases where the change makes a noticeable difference. The values at the ends of the support should be 0 and 1. With the main development branch:
With this pull request:
|
scipy/special/_add_newdocs.py:11:10: UP006 [*] Use `dict` instead of `Dict` for type annotations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very illustrative examples. Nitpick: it could be helpful to add a comparison of calling the Tukey lambda CDF via special.tklmbda
or scipy.stats.tukeylambda
but that is not a must for me.
@dschmitz89, good idea. I added a note at the end of the docstring. You can see the updated docstring at |
This looks like a clear improvement so I'll put it in - thanks @WarrenWeckesser ! |
See the individual commit messages for details.