DOC Update paired_manhattan_distances and make it pass numpydoc validation#23900
Merged
thomasjpfan merged 4 commits intoscikit-learn:mainfrom Jul 16, 2022
philipp-jung:documentation_paired_manhattan_distances
Merged
DOC Update paired_manhattan_distances and make it pass numpydoc validation#23900thomasjpfan merged 4 commits intoscikit-learn:mainfrom philipp-jung:documentation_paired_manhattan_distances
paired_manhattan_distances and make it pass numpydoc validation#23900thomasjpfan merged 4 commits intoscikit-learn:mainfrom
philipp-jung:documentation_paired_manhattan_distances
Conversation
I added additional documentation to `paired_manhattan_distances` to make it pass numpydoc validation as described in issue #21350. While doing this, I created a small example. I wrote the documentation bearing in mind the docstrings of `manhattan_distances` and `paired_distances`.
Contributor
|
Hey there @philipp-jung, thanks for the PR! Per #21350,
could you change your title to something a bit more descriptive? |
paired_manhattan_distances and make it pass numpydoc validation
Contributor
Author
|
I missed that instruction, thank you for pointing it out @Micky774 :-) |
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
jjerphan
approved these changes
Jul 15, 2022
Member
jjerphan
left a comment
There was a problem hiding this comment.
LGTM.
Thank you, @philipp-jung. 🍀
philipp-jung
commented
Jul 16, 2022
| """Compute the paired L1 distances between X and Y. | ||
|
|
||
| Distances are calculated between (X[0], Y[0]), (X[1], Y[1]), ..., | ||
| (X[n_samples], Y[n_samples]). |
Contributor
Author
There was a problem hiding this comment.
I think I am off by 1 here -- if shape(X) == shape(Y) == (n_samples, n_features) == (2, 2), then distances are calculated for (X[0], Y[0]), (X[1], Y[1]). Do you agree @jjerphan?
Suggested change
| (X[n_samples], Y[n_samples]). | |
| (X[n_samples - 1], Y[n_samples - 1]). |
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
thomasjpfan
approved these changes
Jul 16, 2022
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the updates! LGTM
glemaitre
pushed a commit
to glemaitre/scikit-learn
that referenced
this pull request
Aug 4, 2022
…idation (scikit-learn#23900) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
glemaitre
pushed a commit
that referenced
this pull request
Aug 5, 2022
…idation (#23900) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
What does this implement/fix? Explain your changes.
I added additional documentation to
paired_manhattan_distancesto makeit pass numpydoc validation as described in issue #21350.
Any other comments?
While doing this, I created a small example. I wrote the documentation
bearing in mind the docstrings of
manhattan_distancesandpaired_distances. #europython22