(seq, initial_zero)
| 2086 | |
| 2087 | @functools.lru_cache |
| 2088 | def _cumsum(seq, initial_zero): |
| 2089 | if isinstance(seq, _HashIdWrapper): |
| 2090 | seq = seq.wrapped |
| 2091 | if initial_zero: |
| 2092 | return tuple(toolz.accumulate(add, seq, 0)) |
| 2093 | else: |
| 2094 | return tuple(toolz.accumulate(add, seq)) |
| 2095 | |
| 2096 | |
| 2097 | @functools.lru_cache |
no test coverage detected