public static long lengthPerSlice ( INDArray arr , int ... dimension ) { long [ ] remove = ArrayUtil . removeIndex ( arr . shape ( ) , dimension ) ; return ArrayUtil . prodLong ( remove ) ; }
The number of elements in a slice along a set of dimensions