def _check_fit_data(self, X):
X = check_array(X, accept_sparse="<STR_LIT>", dtype=[np.float64, np.float32])<EOL>n_samples, n_features = X.shape<EOL>if X.shape[<NUM_LIT:0>] < self.n_clusters:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>% (X.shape[<NUM_LIT:0>], self.n_clusters)<EOL>)<EOL><DEDENT>for ee in range(n_samples):<EOL><INDENT>if sp.issparse(X):<EOL><INDENT>n = sp.linalg.norm(X[ee, :])<EOL><DEDENT>else:<EOL><INDENT>n = np.linalg.norm(X[ee, :])<EOL><DEDENT>if np.abs(n - <NUM_LIT:1.>) > <NUM_LIT>:<EOL><INDENT>raise ValueError("<STR_LIT>".format(n))<EOL><DEDENT><DEDENT>return X<EOL>
Verify that the number of samples given is larger than k