Skip to content

Commit ad11a90

Browse files
committed
REV: NPV: Remove broadcasting behaviour from docstring
1 parent 8654b26 commit ad11a90

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

numpy_financial/_financial.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -892,31 +892,6 @@ def npv(rate, values):
892892
>>> np.round(npf.npv(rate, cashflows) + initial_cashflow, 5)
893893
3065.22267
894894
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-
920895
"""
921896
values = np.atleast_2d(values)
922897
timestep_array = np.arange(0, values.shape[1])

0 commit comments

Comments
 (0)