From 3ece2c27c0a262df975f58879430d9e9a746e998 Mon Sep 17 00:00:00 2001 From: Karan Desai Date: Fri, 28 Oct 2016 10:14:11 +0530 Subject: [PATCH] DOC Modify description of 'X' in k_means_.py fit methods. --- sklearn/cluster/k_means_.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sklearn/cluster/k_means_.py b/sklearn/cluster/k_means_.py index e91e38cb9dd31..9d8b8f641ec9b 100644 --- a/sklearn/cluster/k_means_.py +++ b/sklearn/cluster/k_means_.py @@ -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. """ random_state = check_random_state(self.random_state) X = self._check_fit_data(X) @@ -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',