code: public static double[][] array_clone(double[][] a) {
          if(a == null) {
              return a;
          }
          double[][] copy = new double[a.length][];
          for(int i=0;i<a.length;i++) {
              copy[i] = Arrays.copyOf(a[i], a[i].length);
          }
          return copy;
      }
docs: Copies the elements of double 2D array.
  
  @param a
  @return