diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-09-02 13:21:48 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-09-03 05:22:10 -0600 |
commit | d2c44c5a012d0a5db7d10a2586c8e9c58045d04b (patch) | |
tree | b93306d17c5460a68d7e7fb29e6be729ad2a28dd /numpy/lib/tests/test_financial.py | |
parent | 57245e4570fa84f2e40a6fa1cc22716d279f8c00 (diff) | |
download | numpy-d2c44c5a012d0a5db7d10a2586c8e9c58045d04b.tar.gz |
STY: Make numpy/lib/test/*.py PEP8 compliant.
Run autopep8 over the test files in numpy/lib/test and make fixes
to the result.
Also remove Python5 workaround.
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) |