public static final double[] toDoubleArray(Instance x,int L){
  double a[]=new double[L];
  for (int i=0; i < L; i++) {
    a[i]=Math.round(x.value(i));
  }
  return a;
}

public static final double [ ] toDoubleArray ( Instance x , int L ) { double a [ ] = new double [ L ] ; for ( int i = 0 ; i < L ; i ++ ) { a [ i ] = Math . round ( x . value ( i ) ) ; } return a ; }
instance with l labels to double [ ] of length l . rounds to the nearest whole number .
