K-means: build the core loop once, then use scikit-learn · 1x1labs.ai