`np.delete` constructs a new array, so this loop takes quadratic time in the number of clusters. Can the array be modified in-place?