docs: public static double[] getDoubleData(DataBuffer buf) {
          if (buf.allocationMode() == DataBuffer.AllocationMode.HEAP)
              return buf.asDouble();
          else {
              double[] ret = new double[(int) buf.length()];
              for (int i = 0; i < buf.length(); i++)
                  ret[i] = buf.getDouble(i);
              return ret;
  
          }
      }