Skip to content

Commit ac420b9

Browse files
authored
Rename lambda variable for clarity in mean_shift.py
1 parent 396a1d3 commit ac420b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

machine_learning/mean_shift.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def mean_shift(
244244
labels = [
245245
min(
246246
range(len(centroids)),
247-
key=lambda i: euclidean_distance(point, centroids[i]),
247+
key=lambda centroid_index: euclidean_distance(point, centroids[centroid_index]),
248248
)
249249
for point in data
250250
]

0 commit comments

Comments
 (0)