-
Notifications
You must be signed in to change notification settings - Fork 105
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: Fix docstrings in gradient.py
#415
Conversation
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 is an improvement, but the docstring might need a more thorough review. In the description (line 205) it says:
"If wrt
is a list/tuple, then return a list/tuple with the results."
But in lines 355-357 it's f
what is checked to match its output type. I also don't know how common Variable
is, it might be worth to use https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_type_aliases for Variable
so it is easier to write but still keep the hyperlink.
Actually I am not too familiar with the code itself. |
You're right. This is correct for the
Quite common, after |
For |
I think the correct thing would be: "If |
Got it. |
Is there something preventing us from proceeding with this PR? |
I didn't realize you had fixed the Rop already. Should be good to go |
Thanks @hsinfan1996 |
gradient.py
Motivation for these changes
Fix docstrings that are not formatted correctly.
Closes #414
Implementation details
According to https://numpydoc.readthedocs.io/en/latest/format.html#returns, return type is always required. Missing return types are added to gradient.py
grad
Lop
andRop
.Checklist
Major / Breaking Changes
New features
Bugfixes
Documentation
Maintenance