'Verify that the number of samples given is larger than k'

def _check_fit_data(self, X):

    X = check_array(X, accept_sparse='csr', dtype=[np.float64, np.float32])
    if (X.shape[0] < self.n_clusters):
        raise ValueError(('n_samples=%d    should    be    >=    n_clusters=%d' % (X.shape[0], self.n_clusters)))
    return X
