Skip to content
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 Ensures that metrics.pairwise.euclidean_distances passes numpydoc validation #21429

Merged
merged 10 commits into from
Oct 24, 2021

Conversation

embandera
Copy link
Contributor

Reference Issues/PRs

Addresses #21350
#DataUmbrella

What does this implement/fix? Explain your changes.

This PR ensures metrics.pairwise.euclidean_distances is compatible with numpydoc:

  • Remove metrics.pairwise.euclidean_distances from DOCSTRING_IGNORE_LIST.
  • Verify that all tests are passing.

Any other comments?

Partner: @genvalen

@embandera embandera marked this pull request as ready for review October 23, 2021 17:20
Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @embandera and @genvalen!

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

A couple of changes

sklearn/metrics/pairwise.py Outdated Show resolved Hide resolved
sklearn/metrics/pairwise.py Outdated Show resolved Hide resolved
@@ -250,6 +249,7 @@ def euclidean_distances(
Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples_X, n_features)
Array containing points.

Y : {array-like, sparse matrix} of shape (n_samples_Y, n_features), \
default=None
Copy link
Member

Choose a reason for hiding this comment

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

Just below, you can as well add:

An array where each row is a sample and each column is a feature. 

Copy link
Member

Choose a reason for hiding this comment

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

You still need to add this line here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@glemaitre Got it! Adding this now

sklearn/metrics/pairwise.py Outdated Show resolved Hide resolved
sklearn/metrics/pairwise.py Outdated Show resolved Hide resolved
sklearn/metrics/pairwise.py Outdated Show resolved Hide resolved
embandera and others added 5 commits October 23, 2021 14:01
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
@glemaitre glemaitre self-requested a review October 23, 2021 21:14
embandera and others added 2 commits October 23, 2021 14:18
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
@glemaitre glemaitre merged commit cbf04c9 into scikit-learn:main Oct 24, 2021
@glemaitre
Copy link
Member

Thanks @embandera

ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Oct 28, 2021
… validation (scikit-learn#21429)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
… validation (scikit-learn#21429)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
… validation (scikit-learn#21429)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
glemaitre added a commit that referenced this pull request Dec 25, 2021
… validation (#21429)

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