def calc_f(self, t1, t2, DEBUG=True):
m_arr = self.mean_array(t1, t2)
f = []
if DEBUG:
full_result = {}
for i in range(len(m_arr)):
n = self.cumul_n[i][t2] - self.cumul_n[i][t1]
w = self.calc_w(i, n)
v = self.calc_v(i, n, t1, t2, m_arr)
results = w * v
f.append(results)
if DEBUG:
full_result[i] = (n, w, v)
return full_result
return f
https://github.com/ComputationalAgronomy/multi_threshold_gotsu_algo/blob/cccb5390e8b7e6e77eda4520dca090da7d018f8b/gotsu_m.py#L59