You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that the trait core::num::Zero referred to in the signature is different from num::traits::Zero defined in rust-num. You get an error like:
error: the trait `core::num::Zero` is not implementedfor the type `num::complex::Complex<f64>` [E0277]
I think it is quite unfortunate that these two traits are not the same. They should be.
A MWE to show the error would be:
use num::complex::Complex;use num::traits::Zero;fnmain(){let cvec = vec![Complex::<f64>::new(1.0,1.0);10];let s = cvec.iter().sum();}