MathTop

cumulative_product 函数

返回数值列表的逐项前缀积。

语法

  • Statistics:-CumulativeProduct(list)
  • cumulative_product(list)
  • cumprod(list)

参数与选项

list形如 [1, 2, 3] 的列表字面量。

示例

  1. 逐项前缀积Statistics:-CumulativeProduct([2, 3, 4])返回 [2, 6, 24]。