Skip to content
Snippets Groups Projects
Commit 4b523004 authored by Josh Rosen's avatar Josh Rosen
Browse files

Fix options parsing in Python pi example.

parent 607b53ab
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ if __name__ == "__main__":
"Usage: PythonPi <host> [<slices>]"
exit(-1)
sc = SparkContext(sys.argv[1], "PythonKMeans")
slices = sys.argv[2] if len(sys.argv) > 2 else 2
slices = int(sys.argv[2]) if len(sys.argv) > 2 else 2
n = 100000 * slices
def f(_):
x = random() * 2 - 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment