release preparation
diff --git a/wally/statistic.py b/wally/statistic.py
index f3fcd6a..a02033d 100644
--- a/wally/statistic.py
+++ b/wally/statistic.py
@@ -19,6 +19,12 @@
return round_deviation((val, val / 10.0))[0]
+def round_deviation_p(med_dev):
+ med, dev = med_dev
+ med, dev = round_deviation((med, med * dev))
+ return [med, float(dev) / med]
+
+
def round_deviation(med_dev):
med, dev = med_dev
@@ -28,8 +34,8 @@
dev_div = 10.0 ** (math.floor(math.log10(dev)) - 1)
dev = int(dev / dev_div) * dev_div
med = int(med / dev_div) * dev_div
- return (type(med_dev[0])(med),
- type(med_dev[1])(dev))
+ return [type(med_dev[0])(med),
+ type(med_dev[1])(dev)]
def groupby_globally(data, key_func):