Added function to reshape arrays for GPy analysis.