nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
public static long offsetFor(INDArray arr, int[] indexes) {
        ShapeOffsetResolution resolution = new ShapeOffsetResolution(arr);
        resolution.exec(Shape.toIndexes(indexes));
        return resolution.getOffset();
    }
public static long offsetFor(INDArray arr, int[] indexes) {
        ShapeOffsetResolution resolution = new ShapeOffsetResolution(arr);
        resolution.exec(Shape.toIndexes(indexes));
        return resolution.getOffset();
    }
public static long offsetFor ( INDArray arr , int [ ] indexes ) { ShapeOffsetResolution resolution = new ShapeOffsetResolution ( arr ) ; resolution . exec ( Shape . toIndexes ( indexes ) ) ; return resolution . getOffset ( ) ; }
Compute the offset for the given array
given the indices
@param arr the array to compute the offset for
@param indexes the indexes along each dimension to create the offset for
@return the offset for the given array and indexes
Compute the offset for the given array given the indices