static double[] takeFirstFromFloatArrayAsDoubleArray(float[] a, int n) { double[] b = new[n]; for i to n: b[i] = a[i]; ret b; }