aesara.tensor.sum

Contents

aesara.tensor.sum#

aesara.tensor.sum(input, axis=None, dtype=None, keepdims=False, acc_dtype=None)[source]#

Computes the sum along the given axis(es) of a tensor input.

When axis is None (the default value), the sum is performed over the flattened tensor.

For full documentation see Sum. In particular please pay attention to the important warning when using a custom acc_dtype.

Parameters:

keepdims (bool) – If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the original tensor.