From a673bcc338c4660e777b5b86fcc5a3e03df9df2b Mon Sep 17 00:00:00 2001 From: warner Date: Tue, 17 Apr 2007 00:21:36 +0530 Subject: [PATCH] fec: remove unused mathutil.linear_fit_slope darcs-hash:c66276a71abd205c6f93173f659fcb9523c2513b --- zfec/zfec/util/mathutil.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/zfec/zfec/util/mathutil.py b/zfec/zfec/util/mathutil.py index 609f0df..203e95a 100644 --- a/zfec/zfec/util/mathutil.py +++ b/zfec/zfec/util/mathutil.py @@ -51,18 +51,6 @@ def log_ceil(n, b): k += 1 return k -def linear_fit_slope(ps): - """ - @param ps a sequence of tuples of (x, y) - """ - avex = ave([x for (x, y) in ps]) - avey = ave([y for (x, y) in ps]) - sxy = sum([ (x - avex) * (y - avey) for (x, y) in ps ]) - sxx = sum([ (x - avex) ** 2 for (x, y) in ps ]) - if sxx == 0: - return None - return sxy / sxx - def permute(l): """ Return all possible permutations of l. -- 2.45.2