code: public static int[] shape(int[] shape, INDArrayIndex... indices) {
          return LongUtils.toInts(shape(LongUtils.toLongs(shape), indices));
      }
docs: Calculate the shape for the given set of indices and offsets.
  <p/>
  The shape is defined as (for each dimension)
  the difference between the end index + 1 and
  the begin index
  <p/>
  If specified, this will check for whether any of the indices are >= to end - 1
  and if so, prune it down
  
  @param shape   the original shape
  @param indices the indices to calculate the shape for
  @return the shape for the given indices