### Question:
ImageJInterpolation { public static float[] linearize2DArray(float[][] input) { float[] linear = new float[input.length * input[0].length]; int lenX = input[0].length; int lenY = input.length; for (int y = 0; y < lenY; y++) { for (int x = 0; x < lenX; x++) { linear[y * lenX + x] = input[y][x]; } } return linear; }  static float[][] resize(float[][] input, int lenX, int lenY); static float[][] crop(float[][] input, float top, float right, float bottom, float left); static float[][] cropAndResize(float[][] input, int lenX, int lenY,
            float minX, float minY, float maxX, float maxY); static float[] linearize2DArray(float[][] input); static float[][] linearizedArrayTo2D(float[] input, int lenX, int lenY);  }### Answer:
@Test public void testLinearize2DArray() throws Exception { float[] expecteds = arr1d; float[] actuals = ImageJInterpolation.linearize2DArray(arr2d); assertArrayEquals(expecteds, actuals, delta); }