Documentation of aggregation methods would be nice

Just FYI these two are not equivalent. Yours will return 0 if the data consists of [1, -1] whereas mine will return 1.

4 Likes