3d array to 2d array reshaping verified