Skip to content

Commit 223e483

Browse files
committed
Update _financial.py
Corrected variable name `values` from ``cash_flow
1 parent efbff01 commit 223e483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy_financial/_financial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ def irr(values):
841841
# if the signs of IRR solutions are not the same, first filter potential IRR
842842
# by comparing the total positive and negative cash flows.
843843
if not same_sign:
844-
pos = sum(cash_flow[cash_flow>0])
845-
neg = sum(cash_flow[cash_flow<0])
844+
pos = sum(values[values>0])
845+
neg = sum(values[values<0])
846846
if pos > neg:
847847
IRR = IRR[IRR > 0]
848848
else:

0 commit comments

Comments
 (0)