shaped-sum ( array axes keepdims? -- result )
NumPy-style shaped-array operations

Prev:shaped-transpose ( array -- view )
Next:shaped-mean ( array axes keepdims? -- result )


Vocabulary
arrays.shaped

Inputs
arraya shaped-array, a sequence, or a number
axesan integer, a sequence, or f
keepdims?a boolean


Outputs
resulta shaped-array


Word description
Sums over the specified axes. f selects all axes; an integer selects one axis; a sequence selects several, with an empty sequence selecting none. Negative axes count from the end; duplicates and invalid axes are rejected. With keepdims? true, reduced axes remain with size one. Returns fresh storage, including a zero-rank shaped array when all axes are removed. Empty sums are zero. Arithmetic uses Factor numeric types rather than NumPy dtype promotion.

Definition