code: public static Double[] asDoubleArray(List<Double> input) {
  		Double[] result = new Double[input.size()];
  
  		for (int i = 0; i < result.length; i++) {
  			result[i] = input.get(i);
  		}
  
  		return result;
  	}
docs: As double array.
  
  @param input the input
  @return the double[]