code: public static long offset(INDArray arr, INDArrayIndex... indices) {
          return offset(arr.stride(), Indices.offsets(arr.shape(), indices));
      }
docs: Compute the offset given an array of offsets.
  The offset is computed(for both fortran an d c ordering) as:
  sum from i to n - 1 o[i] * s[i]
  where i is the index o is the offset and s is the stride
  Notice the -1 at the end.
  @param arr the array to compute the offset for
  @param indices the offsets for each dimension
  @return the offset that should be used for indexing