> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# prefix_sum()

<span id="atoti.array.prefix_sum" />

> atoti.array.prefix\_sum(<br />
>     *measure*: VariableMeasureConvertible,<br />
>     /,<br />
> ) → MeasureDefinition

Return a measure equal to the sum of the previous elements in the passed array measure.

If an array has the following values: `[2.0, 1.0, 0.0, 3.0]`, the returned array will be: `[2.0, 3.0, 3.0, 6.0]`.

### Parameters

<h4 id="atoti.array.prefix_sum.measure">
  *measure*
</h4>

> VariableMeasureConvertible
