public static Object[][] formObjectArray(double[][] data){
  Object[][] object=new Double[data.length][data[0].length];
  for (int i=0; i < object.length; i++) {
    for (int j=0; j < object[i].length; j++) {
      object[i][j]=new Double(data[i][j]);
    }
  }
  return object;
}

public static Object [ ] [ ] formObjectArray ( double [ ] [ ] data ) { Object [ ] [ ] object = new Double [ data . length ] [ data [ 0 ] . length ] ; for ( int i = 0 ; i < object . length ; i ++ ) { for ( int j = 0 ; j < object [ i ] . length ; j ++ ) { object [ i ] [ j ] = new Double ( data [ i ] [ j ] ) ; } } return object ; }
creates an object array from an array of doubles .
