code: public static INDArray toMatrix(List<Row> rows) {
          INDArray ret = Nd4j.create(rows.size(), rows.get(0).size());
          for (int i = 0; i < ret.rows(); i++) {
              for (int j = 0; j < ret.columns(); j++) {
                  ret.putScalar(i, j, rows.get(i).getDouble(j));
              }
          }
          return ret;
      }
docs: Convert a list of rows to a matrix
  @param rows the list of rows to convert
  @return the converted matrix