When computing the the weight W = e ^(-B * S). Where B = D ( variance/mean^2). In compute_coef_var() the scipy variation function is being called however this returns the std/mean. So the result of sigma_zero would be std/(mean^2), not ( variance/mean^2).