summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_financial.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_financial.py b/numpy/lib/tests/test_financial.py
index 6b7c6ef53..41a060a3f 100644
--- a/numpy/lib/tests/test_financial.py
+++ b/numpy/lib/tests/test_financial.py
@@ -13,6 +13,21 @@ class TestFinancial(TestCase):
v = [-150000, 15000, 25000, 35000, 45000, 60000]
assert_almost_equal(np.irr(v),
0.0524, 2)
+ v = [-100, 0, 0, 74]
+ assert_almost_equal(np.irr(v),
+ -0.0955, 2)
+ v = [-100, 39, 59, 55, 20]
+ assert_almost_equal(np.irr(v),
+ 0.28095, 2)
+ v = [-100, 100, 0, -7]
+ assert_almost_equal(np.irr(v),
+ -0.0833, 2)
+ v = [-100, 100, 0, 7]
+ assert_almost_equal(np.irr(v),
+ 0.06206, 2)
+ v = [-5, 10.5, 1, -8, 1]
+ assert_almost_equal(np.irr(v),
+ 0.0886, 2)
def test_pv(self):
assert_almost_equal(np.pv(0.07, 20, 12000, 0),