Skip to content
Snippets Groups Projects
Commit b7a1fb5c authored by Mark Hamstra's avatar Mark Hamstra
Browse files

Add commutative requirement for 'reduce' to Python docstring.

parent 51db4c1f
No related branches found
No related tags found
No related merge requests found
......@@ -274,8 +274,8 @@ class RDD(object):
def reduce(self, f):
"""
Reduces the elements of this RDD using the specified associative binary
operator.
Reduces the elements of this RDD using the specified commutative and
associative binary operator.
>>> from operator import add
>>> sc.parallelize([1, 2, 3, 4, 5]).reduce(add)
......
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