docs: public static char getOrder(int[] shape, int[] stride, int elementStride) {
          int sd;
          int dim;
          int i;
          boolean cContiguous = true;
          boolean isFortran = true;
  
          sd = 1;
          for (i = shape.length - 1; i >= 0; --i) {
              dim = shape[i];
  
              if (stride[i] != sd) {
                  cContiguous = false;
                  break;
              }
              /* contiguous, if it got this far */
              if (dim == 0) {
                  break;
              }
              sd *= dim;
  
          }
  
  
          /* check if fortran contiguous */
          sd = elementStride;
          for (i = 0; i < shape.length; ++i) {
              dim = shape[i];
              if (stride[i] != sd) {
                  isFortran = false;
              }
              if (dim == 0) {
                  break;
              }
              sd *= dim;
  
          }
  
          if (isFortran && cContiguous)
              return 'a';
          else if (isFortran && !cContiguous)
              return 'f';
          else if (!isFortran && !cContiguous)
              return 'c';
          else
              return 'c';
  
      }