def __call__(self, *args):
     sum_ = sum(*args)
     if sum_ == len(args):
         return 1.0
     product_ = product(*args)
     count_ = float(len(args))
     return (sum_ - count_ * product_) / (count_ - sum_)
 def __call__(self, *args):
     args = self.checkArgsN(args)
     sum_ = sum(*args)
     if sum_ == len(args):
         return 1.0
     product_ = product(*args)
     count_ = float(len(args))
     return (sum_ - count_ * product_) / (count_ - sum_)
Exemple #3
0
 def __call__(self, *args):
     args = self.checkArgsN(args)
     if 0. in args:
         return 0.
     return float(len(args))/sum(*[1.0/x for x in args])
Exemple #4
0
 def __call__(self, *args):
     return sum(*args) / float(len(args))
Exemple #5
0
 def __call__(self, *args):
     args = self.checkArgsN(args)
     if 0. in args:
         return 0.
     return float(len(args)) / sum(*[1.0 / x for x in args])
Exemple #6
0
 def __call__(self, *args):
     if 0. in args:
         return 0.
     return float(len(args)) / sum(*[1.0 / x for x in args])
 def __call__(self,*args):
     return sum(*args)/float(len(args))
 def __call__(self, *args):
     args = self.checkArgsN(args)
     return sum(*args) / float(len(args))
 def __call__(self,*args):
     if 0. in args:
         return 0.
     return float(len(args))/sum(*[1.0/x for x in args])
Exemple #10
0
 def __call__(self, *args):
     args = self.checkArgsN(args)
     return sum(*args)/float(len(args))