mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 21:17:54 +00:00
fec: remove unused mathutil.linear_fit_slope
This commit is contained in:
parent
8aa2694595
commit
8e9d090bdb
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user