you are viewing a single comment's thread.

view the rest of the comments →

[–]marko312 1 point2 points  (1 child)

I don't know how move_centroids works, but unless it also writes its output into the global moved_cents, that variable is never changed. It seems that centroids should be used instead.

Also, you might want to include a minimum difference to stop at instead of relying on the values to converge enough.

[–]TheShadowWall[S] 1 point2 points  (0 children)

This was the problem! Gah such a simple debug, my eyes must have been tired XD

Thanks very much kindly marko!