Skip to content

Commit 8289cff

Browse files
committed
Do a cumsum instead of a cumprod in log-case
1 parent 3a4cc90 commit 8289cff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MiniPy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def do_cumprod(lst):
2323
return toReturn
2424

2525
if use_logsum:
26-
return [exp(el_log) for el_log in do_cumprod((log(el) for el in lst))]
26+
return [exp(el_log) for el_log in cumsum((log(el) for el in lst))]
2727
else:
2828
return do_cumprod(lst)
2929

0 commit comments

Comments
 (0)