The labels is NX1 matrix, here I only want to return N elements array, to be consistent with sklearn.kmeans.