'Compute cluster centers and predict cluster index for each sample.
Convenience method; equivalent to calling fit(X) followed by
predict(X).
Parameters
X : {array-like, sparse matrix}, shape = [n_samples, n_features]
New data to transform.
Returns
labels : array, shape [n_samples,]
Index of the cluster each sample belongs to.'

def fit_predict(self, X, y=None):

    return self.fit(X).labels_
