private double[][] oneToTwo(double[] errors, int nCols){
        int nRows = errors.length;
        double[][] ret = new double[nRows][nCols];
        for(int i=0; i<nRows; i++){
            for(int j=0; j<nCols; j++){
                ret[i][j] = errors[i];
            }
        }
        return ret;
    }