class DoubleArrays {

  public static double[][] to2dArray(NumericColumn<?>... columns) {
    Preconditions.checkArgument(columns.length >= 1);
    int obs = columns[0].size();
    double[][] allVals = new double[obs][columns.length];

    for (int r = 0; r < obs; r++) {
      for (int c = 0; c < columns.length; c++) {
        allVals[r][c] = columns[c].getDouble(r);
      }
    }
    return allVals;
  }

}