Skip to content

[MRG] Modify description of 'X' in k_means_.py fit methods. #7776

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions sklearn/cluster/k_means_.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,9 @@ def fit(self, X, y=None):
Parameters
----------
X : array-like or sparse matrix, shape=(n_samples, n_features)
Numerical matrix of training samples to cluster. Each row
will represent a single training sample, a point in space of
'n_features' dimensions.
Copy link
Author

Choose a reason for hiding this comment

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

This is the first draft of description. Commenting here so that this can be seen directly in PR conversation even after this diff gets outdated by any modifications.

"""
random_state = check_random_state(self.random_state)
X = self._check_fit_data(X)
Expand Down Expand Up @@ -1308,8 +1311,10 @@ def fit(self, X, y=None):

Parameters
----------
X : array-like, shape = [n_samples, n_features]
Coordinates of the data points to cluster
X : array-like or sparse matrix, shape=(n_samples, n_features)
Numerical matrix of training samples to cluster. Each row
will represent a single training sample, a point in space of
'n_features' dimensions.
"""
random_state = check_random_state(self.random_state)
X = check_array(X, accept_sparse="csr", order='C',
Expand Down