When performing a reduction, the result shape is computed from the argument shape and reduction axis (by removing that axis).
The result's ravel can be computed from only the argument's ravel and three numbers: the leading bound, axis length, and trailing bound.