diff options
author | Travis Oliphant <oliphant@enthought.com> | 2008-04-08 20:43:07 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2008-04-08 20:43:07 +0000 |
commit | b21be67447392e59eace316f8708c4e17fa70a35 (patch) | |
tree | f0b0b3acd91ad784354e1dd53de9614fc6975580 /numpy/lib/financial.py | |
parent | e4e3018081ad2ab92850ca246ec25dda754c0184 (diff) | |
download | numpy-b21be67447392e59eace316f8708c4e17fa70a35.tar.gz |
Fix doc-tests for financial.py so they don't rely on floating-point exactness. Start filling in final function.
Diffstat (limited to 'numpy/lib/financial.py')
-rw-r--r-- | numpy/lib/financial.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/lib/financial.py b/numpy/lib/financial.py index c5d6d27e7..5bb4a3af7 100644 --- a/numpy/lib/financial.py +++ b/numpy/lib/financial.py @@ -139,11 +139,13 @@ array([[[ 32.58497782, 38.57048452], """ def ipmt(rate, per, nper, pv, fv=0.0, when='end'): + total = pmt(rate, nper, pv, fv, when) + # Now, compute the nth step in the amortization raise NotImplementedError - def ppmt(rate, per, nper, pv, fv=0.0, when='end'): - raise NotImplementedError + total = pmt(rate, nper, pv, fv, when) + return total - ipmt(rate, per, nper, pv, fv, when) def pv(rate, nper, pmt, fv=0.0, when='end'): """Number of periods found by solving the equation |