Use scipy to perform K-means algorithm