Skip to content

DOC Ensure that tosequence passes numpydoc validation#22494

Merged
glemaitre merged 5 commits intoscikit-learn:mainfrom
Kaysera:numpydoc-validation
Feb 17, 2022
Merged

DOC Ensure that tosequence passes numpydoc validation#22494
glemaitre merged 5 commits intoscikit-learn:mainfrom
Kaysera:numpydoc-validation

Conversation

@Kaysera
Copy link
Copy Markdown
Contributor

@Kaysera Kaysera commented Feb 15, 2022

Reference Issues/PRs

Addresses #21350

What does this implement/fix? Explain your changes.

  1. Removed sklearn.utils.tosequence from FUNCTION_DOCSTRING_IGNORE_LIST
  2. Added description to x
  3. Added section Returns

Any other comments?

@Micky774
Copy link
Copy Markdown
Contributor

Hey there @Kaysera! Just wanted to mention that, as specified in #21350, you should:

Include the function name in the title of the pull request. For example: "DOC Ensures that config_context passes numpydoc validation".

So in this case, you should change your title to "DOC Ensure that tosequence passes numpydoc validation".

@Kaysera Kaysera changed the title Numpydoc validation DOC Ensure that tosequence passes numpydoc validation Feb 16, 2022
@Kaysera
Copy link
Copy Markdown
Contributor Author

Kaysera commented Feb 16, 2022

@Micky774 Thank you for your input. Changed!

Added suggestion to convert some words to math notation

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
@Kaysera
Copy link
Copy Markdown
Contributor Author

Kaysera commented Feb 17, 2022

@glemaitre Thanks for the suggestions. Changed!

@glemaitre glemaitre merged commit 8abc6d8 into scikit-learn:main Feb 17, 2022
@glemaitre
Copy link
Copy Markdown
Member

LGTM. Let's merge since the CIs are green.
Thanks @Kaysera

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Feb 17, 2022

If x is from any other type, x is returned casted as a list.

is not really correct. I would have written: "If x is from any other type, return a list containing a single element, namely the input x itself.

Edit: actually I am wrong. Please ignore.

@glemaitre
Copy link
Copy Markdown
Member

glemaitre commented Feb 17, 2022

x is supposed to be an iterable, this makes the trick here.

Edit: actually I am wrong. Please ignore.

I could have been wrong as well. Better to have a second pair of eyes even with simple documentation changes.

thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Mar 1, 2022
…2494)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
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.

4 participants