mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
b32c97ea04
commit
cabb094390
@ -102,6 +102,8 @@ class Stats:
|
|||||||
|
|
||||||
def get_deviation(self, amounts):
|
def get_deviation(self, amounts):
|
||||||
l = float(len(amounts))
|
l = float(len(amounts))
|
||||||
|
if l == 0:
|
||||||
|
return 0
|
||||||
mean = sum(amounts)/l
|
mean = sum(amounts)/l
|
||||||
return sqrt( sum([i**2 for i in amounts])/l - mean**2 )
|
return sqrt( sum([i**2 for i in amounts])/l - mean**2 )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user