# tensorplay.sparse.sum

Source: https://www.tensorplay.cn/docs/generated/tensorplay.sparse.sum.html

# tensorplay.sparse.sum

tensorplay.sparse.sum(input, dim=None, dtype=None)[[source]](../_modules/tensorplay/sparse.html#sum)

Sum of input’s values over dim.

Mirrors torch.sparse.sum: with no dim (or an empty list) the
result is a dense 0-dim tensor; reducing every sparse dim yields a dense
tensor; a partial reduction returns a coalesced sparse COO tensor over
the remaining dims with duplicate coordinates folded.  dtype converts
the input first, acting as the accumulation type.
