pub fn sum_axis_keepdims<T>(
a: &Array<T, IxDyn>,
axis: Axis,
) -> FerrayResult<Array<T, IxDyn>>Expand description
Helper: sum along an axis with keepdims semantics (keeps the axis as size 1).
This is useful as a func argument for apply_over_axes. Generic
over any T: Element + Copy + Zero + Add so it works for any
addable numeric type (#182).
ยงErrors
Returns FerrayError::AxisOutOfBounds if axis >= ndim.