public static double[,] Re(this Complex[,] c)
{
if (c == null)
throw new ArgumentNullException("c");
int rows = c.GetLength(0);
int cols = c.GetLength(1);
var re = new double[rows, cols];
for (int i = 0; i < rows; i++)
for (int j = 0; j < cols; j++)
re[i, j] = c[i, j].Real;
return re;
}