Skip to content

[MRG+1] Fix typos#9095

Merged
lesteve merged 1 commit intoscikit-learn:masterfrom
taehoonlee:fix_typos_3
Jun 10, 2017
Merged

[MRG+1] Fix typos#9095
lesteve merged 1 commit intoscikit-learn:masterfrom
taehoonlee:fix_typos_3

Conversation

@taehoonlee
Copy link
Copy Markdown
Contributor

No description provided.

@agramfort
Copy link
Copy Markdown
Member

LGTM

@agramfort agramfort changed the title [MRG] Fix typos [MRG+1] Fix typos Jun 10, 2017


cdef floating euclidian_dist(floating* a, floating* b, int n_features) nogil:
cdef floating euclidean_dist(floating* a, floating* b, int n_features) nogil:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this function considered private or public?...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It looks private. The outputs of finding all files containing euclidian_dist are as follows:

$ grep -r "euclidian_dist(" .
./sklearn/cluster/_k_means_elkan.pyx:cdef floating euclidian_dist(floating* a, floating* b, int n_features) nogil:
./sklearn/cluster/_k_means_elkan.pyx:        d_c = euclidian_dist(x, centers, n_features)
./sklearn/cluster/_k_means_elkan.pyx:                dist = euclidian_dist(x, c, n_features)
./sklearn/cluster/_k_means_elkan.pyx:                        upper_bound = euclidian_dist(x_p, centers_p + label * n_features, n_features)
./sklearn/cluster/_k_means_elkan.pyx:                        distance = euclidian_dist(x_p, centers_p + center_index * n_features, n_features)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for cdef functions, I believe if there is no pxd it's basically private, because it cannot be imported from third party projects. @ogrisel / @amueller / @GaelVaroquaux am I right?

Maybe we should make it explicit by adding an underscore too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for cdef functions, I believe if there is no pxd it's basically private

Not a cython expert, but I think you are right.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In [1]: from sklearn.cluster import _k_means_elkan

In [2]: _k_means_elkan.euclidi<TAB> # nothing is found

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lesteve that's what I thought. should @taehoonlee then prepend an underscore to make it clear to us in the future?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure, but I would just keep it like this.

@lesteve
Copy link
Copy Markdown
Member

lesteve commented Jun 10, 2017

Let's merge this one, thanks @taehoonlee !

@lesteve lesteve merged commit 93871e2 into scikit-learn:master Jun 10, 2017
@GaelVaroquaux
Copy link
Copy Markdown
Member

GaelVaroquaux commented Jun 10, 2017 via email

Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
@taehoonlee taehoonlee deleted the fix_typos_3 branch June 18, 2017 08:36
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants