turicreate.SArray.cumulative_max¶
-
SArray.
cumulative_max
()¶ Return the cumulative maximum value of the elements in the SArray.
Returns an SArray where each element in the output corresponds to the maximum value of all the elements preceding and including it. The SArray is expected to be of numeric type (int, float).
Returns: - out : SArray[int, float]
Notes
- Missing values are ignored while performing the cumulative aggregate operation.
Examples
>>> sa = SArray([1, 0, 3, 4, 2]) >>> sa.cumulative_max() dtype: int rows: 3 [1, 1, 3, 4, 4]