lib/kalibera/data.rb in kalibera-0.1 vs lib/kalibera/data.rb in kalibera-0.1.1

- old
+ new

@@ -85,12 +85,12 @@ # gives confidence_level of all samples. Mean_indicies is a tuple of one or # two indicies that correspond to the mean position # # Keyword arguments: # confidence_level -- desired level of confidence as a Decimal instance. - def self.confidence_slice_indicies(length, confidence_level=BigDecimal.new('0.95')) + def self.confidence_slice_indicies(length, confidence_level=BigDecimal('0.95')) raise unless !confidence_level.instance_of?(Float) - confidence_level = BigDecimal.new(confidence_level) + confidence_level = BigDecimal(confidence_level) raise unless confidence_level.instance_of?(BigDecimal) exclude = (1 - confidence_level) / 2 if length % 2 == 0 mean_indicies = [length / 2 - 1, length / 2] # TRANSLITERATION: was //