code: public String format(INDArray arr, boolean summarize) {
          if(arr.isEmpty())
              return EMPTY_ARRAY_STR;
          this.scientificFormat = "0.";
          int addPrecision = this.precision;
          while (addPrecision > 0) {
              this.scientificFormat += "#";
              addPrecision -= 1;
          }
          this.scientificFormat = this.scientificFormat + "E0";
          if (this.scientificFormat.length() + 2  > this.padding) this.padding = this.scientificFormat.length() + 2;
          this.maxToPrintWithoutSwitching = Math.pow(10,this.precision);
          this.minToPrintWithoutSwitching = 1.0/(this.maxToPrintWithoutSwitching);
          return format(arr, 0, summarize && arr.length() > maxPrintElements);
      }
docs: Format the given ndarray as a string
  
  @param arr       the array to format
  @param summarize If true and the number of elements in the array is greater than > 1000 only the first three and last elements in any dimension will print
  @return the formatted array