cumulative_products

mathtools.cumulative_products(argument)

Gets cumulative products of argument.

>>> mathtools.cumulative_products([1, 2, 3, 4, 5, 6, 7, 8])
[1, 2, 6, 24, 120, 720, 5040, 40320]
>>> mathtools.cumulative_products([1, -2, 3, -4, 5, -6, 7, -8])
[1, -2, -6, 24, 120, -720, -5040, 40320]

Raises exception when argument is not iterable.

Returns new object of argument type.