Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[SPARK-1170] Remove unnecessary rounding
  • Loading branch information
Chandan Kumar committed Aug 5, 2014
commit 7b522d5ab9150a1b2da34031003749f2f6adc09a
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def getBuckets():
max = mm_stats.max()
increment = (max - min) * 1.0 / bucketCount
if increment != 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if increment:

buckets = [round(min+x*increment, 2) for x in range(bucketCount+1)]
buckets = [min+x*increment for x in range(bucketCount+1)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last one is buckets should be max.

else:
buckets = [min, max]
return buckets
Expand Down