Skip to content

Commit 03fdd7b

Browse files
author
Brennon York
committed
fixed the tuple () wraps around example lambda
1 parent 705d12e commit 03fdd7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/src/main/python/kmeans.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def closestPoint(p, centers):
6868
closest = data.map(
6969
lambda p: (closestPoint(p, kPoints), (p, 1)))
7070
pointStats = closest.reduceByKey(
71-
lambda (p1_c1, p2_c2): (p1_c1[0] + p2_c2[0], p1_c1[1] + p2_c2[1]))
71+
lambda p1_c1, p2_c2: (p1_c1[0] + p2_c2[0], p1_c1[1] + p2_c2[1]))
7272
newPoints = pointStats.map(
7373
lambda st: (st[0], st[1][0] / st[1][1])).collect()
7474

0 commit comments

Comments
 (0)