public static Complex[] ToComplex(this double[] real) { if (real == null) throw new ArgumentNullException("real"); Complex[] arr = new Complex[real.Length]; for (int i = 0; i < arr.Length; i++) arr[i] = new Complex(real[i], 0); return arr; }