@@ -892,31 +892,6 @@ def npv(rate, values):
892
892
>>> np.round(npf.npv(rate, cashflows) + initial_cashflow, 5)
893
893
3065.22267
894
894
895
- The NPV calculation may be applied to several ``rates`` and ``cashflows``
896
- simulatneously. This produces an array of shape
897
- ``(len(rates), len(cashflows))``.
898
-
899
- >>> rates = [0.00, 0.05, 0.10]
900
- >>> cashflows = [[-4_000, 500, 800], [-5_000, 600, 900]]
901
- >>> npf.npv(rates, cashflows).round(2)
902
- array([[-2700. , -3500. ],
903
- [-2798.19, -3612.24],
904
- [-2884.3 , -3710.74]])
905
-
906
- The NPV calculation also supports `decimal.Decimal` types, for example
907
- if using Decimal ``rates``:
908
-
909
- >>> rates = [Decimal("0.00"), Decimal("0.05"), Decimal("0.10")]
910
- >>> cashflows = [[-4_000, 500, 800], [-5_000, 600, 900]]
911
- >>> npf.npv(rates, cashflows)
912
- array([[Decimal('-2700.0'), Decimal('-3500.0')],
913
- [Decimal('-2798.185941043083900226757370'),
914
- Decimal('-3612.244897959183673469387756')],
915
- [Decimal('-2884.297520661157024793388430'),
916
- Decimal('-3710.743801652892561983471074')]], dtype=object)
917
-
918
- This also works for Decimal cashflows.
919
-
920
895
"""
921
896
values = np .atleast_2d (values )
922
897
timestep_array = np .arange (0 , values .shape [1 ])
0 commit comments