Skip to content

Commit

Permalink
DOC: NPV: Update documentation to support array arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai-Striega committed Dec 9, 2023
1 parent b126521 commit 04af33f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions numpy_financial/_financial.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,9 @@ def npv(rate, values):
Parameters
----------
rate : scalar
rate : scalar or array_like shape(K, )
The discount rate.
values : array_like, shape(M, )
values : array_like, shape(M, ) or shape(M, N)
The values of the time series of cash flows. The (fixed) time
interval between cash flow "events" must be the same as that for
which `rate` is given (i.e., if `rate` is per year, then precisely
Expand All @@ -895,9 +895,10 @@ def npv(rate, values):
Returns
-------
out : float
out : float or array shape(K, M)
The NPV of the input cash flow series `values` at the discount
`rate`.
`rate`. `out` follows the ufunc convention of returning scalars
instead of single element arrays.
Warnings
--------
Expand Down

0 comments on commit 04af33f

Please sign in to comment.