Skip to content

Commit 04af33f

Browse files
committed
DOC: NPV: Update documentation to support array arguments
1 parent b126521 commit 04af33f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

numpy_financial/_financial.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -882,9 +882,9 @@ def npv(rate, values):
882882
883883
Parameters
884884
----------
885-
rate : scalar
885+
rate : scalar or array_like shape(K, )
886886
The discount rate.
887-
values : array_like, shape(M, )
887+
values : array_like, shape(M, ) or shape(M, N)
888888
The values of the time series of cash flows. The (fixed) time
889889
interval between cash flow "events" must be the same as that for
890890
which `rate` is given (i.e., if `rate` is per year, then precisely
@@ -895,9 +895,10 @@ def npv(rate, values):
895895
896896
Returns
897897
-------
898-
out : float
898+
out : float or array shape(K, M)
899899
The NPV of the input cash flow series `values` at the discount
900-
`rate`.
900+
`rate`. `out` follows the ufunc convention of returning scalars
901+
instead of single element arrays.
901902
902903
Warnings
903904
--------

0 commit comments

Comments
 (0)