diff options
Diffstat (limited to 'numpy/lib/tests/test_financial.py')
-rw-r--r-- | numpy/lib/tests/test_financial.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/lib/tests/test_financial.py b/numpy/lib/tests/test_financial.py index 1894da8cb..6b7c6ef53 100644 --- a/numpy/lib/tests/test_financial.py +++ b/numpy/lib/tests/test_financial.py @@ -3,6 +3,7 @@ from __future__ import division, absolute_import, print_function from numpy.testing import * import numpy as np + class TestFinancial(TestCase): def test_rate(self): assert_almost_equal(np.rate(10, 0, -3500, 10000), @@ -40,8 +41,9 @@ class TestFinancial(TestCase): 50.0, 1) def test_npv(self): - assert_almost_equal(np.npv(0.05, [-15000, 1500, 2500, 3500, 4500, 6000]), - 122.89, 2) + assert_almost_equal( + np.npv(0.05, [-15000, 1500, 2500, 3500, 4500, 6000]), + 122.89, 2) def test_mirr(self): val = [-4500, -800, 800, 800, 600, 600, 800, 800, 700, 3000] @@ -122,7 +124,7 @@ class TestFinancial(TestCase): def test_broadcast(self): assert_almost_equal(np.nper(0.075, -2000, 0, 100000., [0, 1]), - [ 21.5449442, 20.76156441], 4) + [21.5449442, 20.76156441], 4) assert_almost_equal(np.ipmt(0.1/12, list(range(5)), 24, 2000), [-17.29165168, -16.66666667, -16.03647345, @@ -133,7 +135,7 @@ class TestFinancial(TestCase): -76.88882405, -77.52956425], 4) assert_almost_equal(np.ppmt(0.1/12, list(range(5)), 24, 2000, 0, - [0, 0, 1, 'end', 'begin']), + [0, 0, 1, 'end', 'begin']), [-74.998201, -75.62318601, -75.62318601, -76.88882405, -76.88882405], 4) |