Don't mutate initial_centroids

This commit is contained in:
kris 2021-11-24 09:10:03 +00:00
parent 7179d009e1
commit 62f23ff910
1 changed files with 1 additions and 1 deletions

View File

@ -543,7 +543,7 @@ def k_means_with_fixed_centroids(
cdef double error, best_error, centroid_movement, total_error
cdef int centroid_idx, closest_centroid_idx, i, point_idx
cdef (unsigned char)[:, ::1] centroids_rgb12 = initial_centroids[:, :]
cdef (unsigned char)[:, ::1] centroids_rgb12 = np.copy(initial_centroids)
cdef (unsigned char)[:, ::1] new_centroids_rgb12
cdef float[::1] point_cam