Trying to solve problem in sumk

eps_hat cannot be used if complex...
Exception: Exception TypeError: "can't convert complex to float" in 'dcomplex.as_dcomplex' ignored
Hard to pinpoint where this comes from...