Sum¶
This function allows you to compute the sum of vectors, matrices, and tensors.
- omtools.std.sum.sum(*summands: List[omtools.core.variable.Variable], axes=None)¶
This function can compute an elementwise or axiswise sum of a single or multiple inputs.
- Parameters
- summands: Variable(s)
The Variable(s) over which to take the sum
- axes: tuple[int]
The axes along which the sum will be taken over
Examples for all the possible use cases are provided below.