lib/easystats.rb in easystats-0.4.0.rc1 vs lib/easystats.rb in easystats-0.4.0.rc2
- old
+ new
@@ -37,10 +37,10 @@
def probability_distribution
return if empty?
total = count.to_f
- inject({}) { |result, item|
+ uniq.inject({}) { |result, item|
result.update({ item => count(item) / total })
}
end unless method_defined? :probability_distribution
def range