From 8e9d090bdbe018e9705c6f1edb804fcba8ef5379 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 16 Apr 2007 11:51:36 -0700 Subject: [PATCH] fec: remove unused mathutil.linear_fit_slope --- pyfec/fec/util/mathutil.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pyfec/fec/util/mathutil.py b/pyfec/fec/util/mathutil.py index ea8312d9..5f70a80e 100644 --- a/pyfec/fec/util/mathutil.py +++ b/pyfec/fec/util/mathutil.py @@ -58,18 +58,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