/
usr
/
lib64
/
python2.6
/
site-packages
/
numpy
/
core
/
tests
/
/usr/lib64/python2.6/site-packages/numpy/core/tests
mkdir
upload
Name
Size
Mode
Actions
data/
-
0755
rm
test_blasdot.py
465
0644
edit
dl
rm
test_blasdot.pyc
990
0644
edit
dl
rm
test_blasdot.pyo
990
0644
edit
dl
rm
test_defchararray.py
23583
0644
edit
dl
rm
test_defchararray.pyc
36847
0644
edit
dl
rm
test_defchararray.pyo
32392
0644
edit
dl
rm
test_dtype.py
3987
0644
edit
dl
rm
test_dtype.pyc
6546
0644
edit
dl
rm
test_dtype.pyo
6546
0644
edit
dl
rm
test_errstate.py
1712
0644
edit
dl
rm
test_errstate.pyc
1654
0644
edit
dl
rm
test_errstate.pyo
1654
0644
edit
dl
rm
test_function_base.py
984
0644
edit
dl
rm
test_function_base.pyc
2319
0644
edit
dl
rm
test_function_base.pyo
2017
0644
edit
dl
rm
test_getlimits.py
1630
0644
edit
dl
rm
test_getlimits.pyc
3799
0644
edit
dl
rm
test_getlimits.pyo
3799
0644
edit
dl
rm
test_machar.py
1000
0644
edit
dl
rm
test_machar.pyc
1705
0644
edit
dl
rm
test_machar.pyo
1705
0644
edit
dl
rm
test_memmap.py
2101
0644
edit
dl
rm
test_memmap.pyc
3341
0644
edit
dl
rm
test_memmap.pyo
3289
0644
edit
dl
rm
test_multiarray.py
51858
0644
edit
dl
rm
test_multiarray.pyc
70254
0644
edit
dl
rm
test_multiarray.pyo
69639
0644
edit
dl
rm
test_numeric.py
30773
0644
edit
dl
rm
test_numeric.pyc
48028
0644
edit
dl
rm
test_numeric.pyo
45970
0644
edit
dl
rm
test_numerictypes.py
14194
0644
edit
dl
rm
test_numerictypes.pyc
17908
0644
edit
dl
rm
test_numerictypes.pyo
17572
0644
edit
dl
rm
test_print.py
8091
0644
edit
dl
rm
test_print.pyc
9224
0644
edit
dl
rm
test_print.pyo
9224
0644
edit
dl
rm
test_records.py
5325
0644
edit
dl
rm
test_records.pyc
9183
0644
edit
dl
rm
test_records.pyo
8534
0644
edit
dl
rm
test_regression.py
43097
0644
edit
dl
rm
test_regression.pyc
67025
0644
edit
dl
rm
test_regression.pyo
62503
0644
edit
dl
rm
test_scalarmath.py
3789
0644
edit
dl
rm
test_scalarmath.pyc
5395
0644
edit
dl
rm
test_scalarmath.pyo
5096
0644
edit
dl
rm
test_shape_base.py
4571
0644
edit
dl
rm
test_shape_base.pyc
8890
0644
edit
dl
rm
test_shape_base.pyo
8326
0644
edit
dl
rm
test_ufunc.py
16944
0644
edit
dl
rm
test_ufunc.pyc
18366
0644
edit
dl
rm
test_ufunc.pyo
18135
0644
edit
dl
rm
test_umath.py
35991
0644
edit
dl
rm
test_umath.pyc
54765
0644
edit
dl
rm
test_umath.pyo
51377
0644
edit
dl
rm
test_umath_complex.py
17728
0644
edit
dl
rm
test_umath_complex.pyc
16886
0644
edit
dl
rm
test_umath_complex.pyo
16886
0644
edit
dl
rm
test_unicode.py
11255
0644
edit
dl
rm
test_unicode.pyc
15070
0644
edit
dl
rm
test_unicode.pyo
15070
0644
edit
dl
rm
Edit:
/usr/lib64/python2.6/site-packages/numpy/core/tests/test_getlimits.py
(1630B)
""" Test functions for limits module. """ from numpy.testing import * import numpy.lib reload(numpy.lib) from numpy.core import finfo, iinfo from numpy import single,double,longdouble import numpy as np ################################################## class TestPythonFloat(TestCase): def test_singleton(self): ftype = finfo(float) ftype2 = finfo(float) assert_equal(id(ftype),id(ftype2)) class TestSingle(TestCase): def test_singleton(self): ftype = finfo(single) ftype2 = finfo(single) assert_equal(id(ftype),id(ftype2)) class TestDouble(TestCase): def test_singleton(self): ftype = finfo(double) ftype2 = finfo(double) assert_equal(id(ftype),id(ftype2)) class TestLongdouble(TestCase): def test_singleton(self,level=2): ftype = finfo(longdouble) ftype2 = finfo(longdouble) assert_equal(id(ftype),id(ftype2)) class TestIinfo(TestCase): def test_basic(self): dts = zip(['i1', 'i2', 'i4', 'i8', 'u1', 'u2', 'u4', 'u8'], [np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64]) for dt1, dt2 in dts: assert_equal(iinfo(dt1).min, iinfo(dt2).min) assert_equal(iinfo(dt1).max, iinfo(dt2).max) self.assertRaises(ValueError, iinfo, 'f4') def test_unsigned_max(self): types = np.sctypes['uint'] for T in types: assert_equal(iinfo(T).max, T(-1)) def test_instances(): iinfo(10) finfo(3.0) if __name__ == "__main__": run_module_suite()
Save
cmd:
run