code: public double getMax() {
          double max = s.minValue();
          for (int c = 0; c < this.size(); c++) {
              double val = getValue(c);
              if (s.gte(val, max)) {
                  max = val;
              }
          }
          return max;
      }
docs: Gets the max value in the tensor.