/
usr
/
lib64
/
python2.6
/
site-packages
/
numpy
/
lib
/
tests
/
/usr/lib64/python2.6/site-packages/numpy/lib/tests
mkdir
upload
Name
Size
Mode
Actions
test_arraysetops.py
6993
0644
edit
dl
rm
test_arraysetops.pyc
7760
0644
edit
dl
rm
test_arraysetops.pyo
7760
0644
edit
dl
rm
test_arrayterator.py
1315
0644
edit
dl
rm
test_arrayterator.pyc
1964
0644
edit
dl
rm
test_arrayterator.pyo
1710
0644
edit
dl
rm
test_financial.py
1911
0644
edit
dl
rm
test_financial.pyc
3683
0644
edit
dl
rm
test_financial.pyo
3683
0644
edit
dl
rm
test_format.py
25312
0644
edit
dl
rm
test_format.pyc
25261
0644
edit
dl
rm
test_format.pyo
25236
0644
edit
dl
rm
test_function_base.py
31443
0644
edit
dl
rm
test_function_base.pyc
43457
0644
edit
dl
rm
test_function_base.pyo
42029
0644
edit
dl
rm
test_index_tricks.py
3928
0644
edit
dl
rm
test_index_tricks.pyc
7125
0644
edit
dl
rm
test_index_tricks.pyo
6529
0644
edit
dl
rm
test_io.py
44958
0644
edit
dl
rm
test_io.pyc
58173
0644
edit
dl
rm
test_io.pyo
57879
0644
edit
dl
rm
test_polynomial.py
3566
0644
edit
dl
rm
test_polynomial.pyc
5303
0644
edit
dl
rm
test_polynomial.pyo
4728
0644
edit
dl
rm
test_recfunctions.py
24942
0644
edit
dl
rm
test_recfunctions.pyc
29895
0644
edit
dl
rm
test_recfunctions.pyo
29813
0644
edit
dl
rm
test_regression.py
6357
0644
edit
dl
rm
test_regression.pyc
11069
0644
edit
dl
rm
test_regression.pyo
10974
0644
edit
dl
rm
test_shape_base.py
9945
0644
edit
dl
rm
test_shape_base.pyc
16188
0644
edit
dl
rm
test_shape_base.pyo
16059
0644
edit
dl
rm
test_stride_tricks.py
6958
0644
edit
dl
rm
test_stride_tricks.pyc
9183
0644
edit
dl
rm
test_stride_tricks.pyo
9144
0644
edit
dl
rm
test_twodim_base.py
10185
0644
edit
dl
rm
test_twodim_base.pyc
14005
0644
edit
dl
rm
test_twodim_base.pyo
14005
0644
edit
dl
rm
test_type_check.py
9579
0644
edit
dl
rm
test_type_check.pyc
18846
0644
edit
dl
rm
test_type_check.pyo
18044
0644
edit
dl
rm
test_ufunclike.py
1776
0644
edit
dl
rm
test_ufunclike.pyc
2129
0644
edit
dl
rm
test_ufunclike.pyo
2129
0644
edit
dl
rm
test_utils.py
910
0644
edit
dl
rm
test_utils.pyc
2211
0644
edit
dl
rm
test_utils.pyo
1955
0644
edit
dl
rm
test__datasource.py
9921
0644
edit
dl
rm
test__datasource.pyc
16260
0644
edit
dl
rm
test__datasource.pyo
15403
0644
edit
dl
rm
test__iotools.py
10899
0644
edit
dl
rm
test__iotools.pyc
12397
0644
edit
dl
rm
test__iotools.pyo
12305
0644
edit
dl
rm
Edit:
/usr/lib64/python2.6/site-packages/numpy/lib/tests/test_financial.py
(1911B)
from numpy.testing import * import numpy as np class TestFinancial(TestCase): def test_rate(self): assert_almost_equal(np.rate(10,0,-3500,10000), 0.1107, 4) def test_irr(self): v = [-150000, 15000, 25000, 35000, 45000, 60000] assert_almost_equal(np.irr(v), 0.0524, 2) def test_pv(self): assert_almost_equal(np.pv(0.07,20,12000,0), -127128.17, 2) def test_fv(self): assert_almost_equal(np.fv(0.075, 20, -2000,0,0), 86609.36, 2) def test_pmt(self): assert_almost_equal(np.pmt(0.08/12,5*12,15000), -304.146, 3) def test_nper(self): assert_almost_equal(np.nper(0.075,-2000,0,100000.), 21.54, 2) def test_nper(self): assert_almost_equal(np.nper(0.0,-2000,0,100000.), 50.0, 1) def test_npv(self): assert_almost_equal(np.npv(0.05,[-15000,1500,2500,3500,4500,6000]), 117.04, 2) def test_mirr(self): val = [-4500,-800,800,800,600,600,800,800,700,3000] assert_almost_equal(np.mirr(val, 0.08, 0.055), 0.0666, 4) val = [-120000,39000,30000,21000,37000,46000] assert_almost_equal(np.mirr(val, 0.10, 0.12), 0.126094, 6) val = [100,200,-50,300,-200] assert_almost_equal(np.mirr(val, 0.05, 0.06), 0.3428, 4) val = [39000,30000,21000,37000,46000] assert_(np.isnan(np.mirr(val, 0.10, 0.12))) def test_unimplemented(): # np.round(np.ppmt(0.1/12,1,60,55000),2) == 710.25 assert_raises(NotImplementedError, np.ppmt, 0.1/12, 1, 60, 55000) # np.round(np.ipmt(0.1/12,1,24,2000),2) == 16.67 assert_raises(NotImplementedError, np.ipmt, 0.1/12, 1, 24, 2000) if __name__ == "__main__": run_module_suite()
Save
cmd:
run