Skip to content

DOC Ensures that NMF passes numpydoc validation #20869

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

Merged
merged 4 commits into from
Aug 31, 2021

Conversation

genvalen
Copy link
Contributor

Reference Issues/PRs

Addresses #20308

What does this implement/fix? Explain your changes.

Any other comments?

Comment on lines 1702 to 1708
Returns
-------
X : {ndarray, sparse matrix} of shape (n_samples, n_features)
Data matrix of original shape.
Returns a data matrix of the original shape.

.. versionadded:: 0.18
.. versionadded:: 0.18
"""
Copy link
Contributor Author

@genvalen genvalen Aug 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an RT03 error for this section (Return value has no description) even though it does have a description.

The test passes if I indent .. versionadded:: 0.18, making it part of the description.

I wanted to double check that this is okay since I haven't seen it before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that inverse_transform was the method added in 0.18. A better way is to move this versionadded above the Parameters section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that makes so much sense.

@glemaitre glemaitre merged commit b3b1955 into scikit-learn:main Aug 31, 2021
@glemaitre
Copy link
Member

LGTM. Thanks @genvalen

@genvalen genvalen deleted the NMF_numpydoc branch September 1, 2021 06:55
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants