code: public static int[] toInt(double[] array) {
          int[] n = new int[array.length];
          for (int i = 0; i < array.length; i++) {
              n[i] = (int) array[i];
          }
          return n;
      }
docs: 1-D Double array to integer array.
  
  @param array Double array.
  @return Integer array.