-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Update paired_manhattan_distances
and make it pass numpydoc validation
#23900
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 Update paired_manhattan_distances
and make it pass numpydoc validation
#23900
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`.
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
I missed that instruction, thank you for pointing it out @Micky774 :-) |
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.
Thank you for the PR!
Co-authored-by: Thomas J. Fan <[email protected]>
Co-authored-by: Thomas J. Fan <[email protected]>
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.
LGTM.
Thank you, @philipp-jung. 🍀
"""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]). |
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.
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?
(X[n_samples], Y[n_samples]). | |
(X[n_samples - 1], Y[n_samples - 1]). |
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.
That's right.
Co-authored-by: Julien Jerphanion <[email protected]>
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.
Thank you for the updates! LGTM
…idation (scikit-learn#23900) Co-authored-by: Thomas J. Fan <[email protected]> Co-authored-by: Julien Jerphanion <[email protected]>
…idation (#23900) Co-authored-by: Thomas J. Fan <[email protected]> Co-authored-by: Julien Jerphanion <[email protected]>
Reference Issues/PRs
What does this implement/fix? Explain your changes.
I added additional documentation to
paired_manhattan_distances
to 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_distances
andpaired_distances
. #europython22