Simple k-means clustering implementation in Python