Skip to content

Commit b431e67

Browse files
Chandan Kumarpwendell
authored andcommitted
[SPARK-2861] Fix Doc comment of histogram method
Tested and ready to merge. Author: Chandan Kumar <chandan.kumar@imaginea.com> Closes apache#1786 from nrchandan/spark-2861 and squashes the following commits: cb0bc1e [Chandan Kumar] [SPARK-2861] Fix a typo in the histogram doc comment 6a2a71b [Chandan Kumar] SPARK-2861. Fix Doc comment of histogram method
1 parent 28dbae8 commit b431e67

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/main/scala/org/apache/spark/rdd/DoubleRDDFunctions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
119119

120120
/**
121121
* Compute a histogram using the provided buckets. The buckets are all open
122-
* to the left except for the last which is closed
122+
* to the right except for the last which is closed
123123
* e.g. for the array
124124
* [1, 10, 20, 50] the buckets are [1, 10) [10, 20) [20, 50]
125-
* e.g 1<=x<10 , 10<=x<20, 20<=x<50
126-
* And on the input of 1 and 50 we would have a histogram of 1, 0, 0
125+
* e.g 1<=x<10 , 10<=x<20, 20<=x<=50
126+
* And on the input of 1 and 50 we would have a histogram of 1, 0, 1
127127
*
128128
* Note: if your histogram is evenly spaced (e.g. [0, 10, 20, 30]) this can be switched
129129
* from an O(log n) inseration to O(1) per element. (where n = # buckets) if you set evenBuckets

0 commit comments

Comments
 (0)