Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib64 /
python2.7 /
site-packages /
numpy /
core /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
data
[ DIR ]
drwxr-xr-x
2021-09-16 10:54
test_api.py
6.56
KB
-rw-r--r--
2013-04-07 01:04
test_api.pyc
5.67
KB
-rw-r--r--
2018-04-10 19:40
test_api.pyo
5.67
KB
-rw-r--r--
2018-04-10 19:40
test_arrayprint.py
6.6
KB
-rw-r--r--
2013-04-07 01:04
test_arrayprint.pyc
9.75
KB
-rw-r--r--
2018-04-10 19:40
test_arrayprint.pyo
9.75
KB
-rw-r--r--
2018-04-10 19:40
test_blasdot.py
2.54
KB
-rw-r--r--
2013-04-07 01:04
test_blasdot.pyc
3.89
KB
-rw-r--r--
2018-04-10 19:40
test_blasdot.pyo
3.89
KB
-rw-r--r--
2018-04-10 19:40
test_datetime.py
82
KB
-rw-r--r--
2013-04-07 01:04
test_datetime.pyc
54.52
KB
-rw-r--r--
2018-04-10 19:40
test_datetime.pyo
54.39
KB
-rw-r--r--
2018-04-10 19:40
test_defchararray.py
25.06
KB
-rw-r--r--
2013-04-07 01:04
test_defchararray.pyc
36.88
KB
-rw-r--r--
2018-04-10 19:40
test_defchararray.pyo
36.88
KB
-rw-r--r--
2018-04-10 19:40
test_dtype.py
19.82
KB
-rw-r--r--
2013-04-07 01:04
test_dtype.pyc
20.52
KB
-rw-r--r--
2018-04-10 19:40
test_dtype.pyo
20.52
KB
-rw-r--r--
2018-04-10 19:40
test_einsum.py
19.46
KB
-rw-r--r--
2013-04-07 01:04
test_einsum.pyc
16.12
KB
-rw-r--r--
2018-04-10 19:40
test_einsum.pyo
16.12
KB
-rw-r--r--
2018-04-10 19:40
test_errstate.py
1.83
KB
-rw-r--r--
2013-04-07 01:04
test_errstate.pyc
1.76
KB
-rw-r--r--
2018-04-10 19:40
test_errstate.pyo
1.76
KB
-rw-r--r--
2018-04-10 19:40
test_function_base.py
994
B
-rw-r--r--
2013-04-07 01:04
test_function_base.pyc
2.23
KB
-rw-r--r--
2018-04-10 19:40
test_function_base.pyo
2.23
KB
-rw-r--r--
2018-04-10 19:40
test_getlimits.py
2.64
KB
-rw-r--r--
2013-04-07 01:04
test_getlimits.pyc
5.19
KB
-rw-r--r--
2018-04-10 19:40
test_getlimits.pyo
5.19
KB
-rw-r--r--
2018-04-10 19:40
test_half.py
17.95
KB
-rw-r--r--
2013-04-07 01:04
test_half.pyc
17.75
KB
-rw-r--r--
2018-04-10 19:40
test_half.pyo
17.75
KB
-rw-r--r--
2018-04-10 19:40
test_indexerrors.py
4.75
KB
-rw-r--r--
2013-04-07 01:04
test_indexerrors.pyc
11.02
KB
-rw-r--r--
2018-04-10 19:40
test_indexerrors.pyo
11.02
KB
-rw-r--r--
2018-04-10 19:40
test_indexing.py
800
B
-rw-r--r--
2013-04-07 01:04
test_indexing.pyc
786
B
-rw-r--r--
2018-04-10 19:40
test_indexing.pyo
786
B
-rw-r--r--
2018-04-10 19:40
test_item_selection.py
2.46
KB
-rw-r--r--
2013-04-07 01:04
test_item_selection.pyc
2.57
KB
-rw-r--r--
2018-04-10 19:40
test_item_selection.pyo
2.57
KB
-rw-r--r--
2018-04-10 19:40
test_machar.py
1000
B
-rw-r--r--
2013-04-07 01:04
test_machar.pyc
1.66
KB
-rw-r--r--
2018-04-10 19:40
test_machar.pyo
1.66
KB
-rw-r--r--
2018-04-10 19:40
test_memmap.py
3.81
KB
-rw-r--r--
2018-04-10 19:39
test_memmap.pyc
5.5
KB
-rw-r--r--
2018-04-10 19:40
test_memmap.pyo
5.28
KB
-rw-r--r--
2018-04-10 19:40
test_multiarray.py
107.04
KB
-rw-r--r--
2018-04-10 19:39
test_multiarray.pyc
125.9
KB
-rw-r--r--
2018-04-10 19:40
test_multiarray.pyo
125.53
KB
-rw-r--r--
2018-04-10 19:40
test_multiarray_assignment.py
1.81
KB
-rw-r--r--
2013-04-07 01:04
test_multiarray_assignment.pyc
2.65
KB
-rw-r--r--
2018-04-10 19:40
test_multiarray_assignment.pyo
2.55
KB
-rw-r--r--
2018-04-10 19:40
test_nditer.py
93.58
KB
-rw-r--r--
2013-04-07 01:04
test_nditer.pyc
79.07
KB
-rw-r--r--
2018-04-10 19:40
test_nditer.pyo
79.07
KB
-rw-r--r--
2018-04-10 19:40
test_numeric.py
52.63
KB
-rw-r--r--
2013-04-07 01:04
test_numeric.pyc
66.87
KB
-rw-r--r--
2018-04-10 19:40
test_numeric.pyo
66.87
KB
-rw-r--r--
2018-04-10 19:40
test_numerictypes.py
14.2
KB
-rw-r--r--
2013-04-07 01:04
test_numerictypes.pyc
17.63
KB
-rw-r--r--
2018-04-10 19:40
test_numerictypes.pyo
17.63
KB
-rw-r--r--
2018-04-10 19:40
test_print.py
9.3
KB
-rw-r--r--
2013-04-07 01:04
test_print.pyc
10.51
KB
-rw-r--r--
2018-04-10 19:40
test_print.pyo
10.51
KB
-rw-r--r--
2018-04-10 19:40
test_records.py
5.63
KB
-rw-r--r--
2013-04-07 01:04
test_records.pyc
9.4
KB
-rw-r--r--
2018-04-10 19:40
test_records.pyo
9.4
KB
-rw-r--r--
2018-04-10 19:40
test_regression.py
62.21
KB
-rw-r--r--
2013-04-07 01:04
test_regression.pyc
90.43
KB
-rw-r--r--
2018-04-10 19:40
test_regression.pyo
90.43
KB
-rw-r--r--
2018-04-10 19:40
test_scalarmath.py
5.53
KB
-rw-r--r--
2013-04-07 01:04
test_scalarmath.pyc
6.78
KB
-rw-r--r--
2018-04-10 19:40
test_scalarmath.pyo
6.78
KB
-rw-r--r--
2018-04-10 19:40
test_shape_base.py
7.07
KB
-rw-r--r--
2013-04-07 01:04
test_shape_base.pyc
10.66
KB
-rw-r--r--
2018-04-10 19:40
test_shape_base.pyo
10.66
KB
-rw-r--r--
2018-04-10 19:40
test_ufunc.py
30.64
KB
-rw-r--r--
2013-04-07 01:04
test_ufunc.pyc
31.48
KB
-rw-r--r--
2018-04-10 19:40
test_ufunc.pyo
31.34
KB
-rw-r--r--
2018-04-10 19:40
test_umath.py
44.02
KB
-rw-r--r--
2013-04-07 01:04
test_umath.pyc
62.8
KB
-rw-r--r--
2018-04-10 19:40
test_umath.pyo
62.73
KB
-rw-r--r--
2018-04-10 19:40
test_umath_complex.py
20.05
KB
-rw-r--r--
2013-04-07 01:04
test_umath_complex.pyc
18.83
KB
-rw-r--r--
2018-04-10 19:40
test_umath_complex.pyo
18.83
KB
-rw-r--r--
2018-04-10 19:40
test_unicode.py
12.18
KB
-rw-r--r--
2013-04-07 01:04
test_unicode.pyc
15.84
KB
-rw-r--r--
2018-04-10 19:40
test_unicode.pyo
15.84
KB
-rw-r--r--
2018-04-10 19:40
Save
Rename
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import numpy as np from numpy.testing import * class TestArrayRepr(object): def test_nan_inf(self): x = np.array([np.nan, np.inf]) assert_equal(repr(x), 'array([ nan, inf])') class TestComplexArray(TestCase): def test_str(self): rvals = [0, 1, -1, np.inf, -np.inf, np.nan] cvals = [complex(rp, ip) for rp in rvals for ip in rvals] dtypes = [np.complex64, np.cdouble, np.clongdouble] actual = [str(np.array([c], dt)) for c in cvals for dt in dtypes] wanted = [ '[ 0.+0.j]', '[ 0.+0.j]', '[ 0.0+0.0j]', '[ 0.+1.j]', '[ 0.+1.j]', '[ 0.0+1.0j]', '[ 0.-1.j]', '[ 0.-1.j]', '[ 0.0-1.0j]', '[ 0.+infj]', '[ 0.+infj]', '[ 0.0+infj]', '[ 0.-infj]', '[ 0.-infj]', '[ 0.0-infj]', '[ 0.+nanj]', '[ 0.+nanj]', '[ 0.0+nanj]', '[ 1.+0.j]', '[ 1.+0.j]', '[ 1.0+0.0j]', '[ 1.+1.j]', '[ 1.+1.j]', '[ 1.0+1.0j]', '[ 1.-1.j]', '[ 1.-1.j]', '[ 1.0-1.0j]', '[ 1.+infj]', '[ 1.+infj]', '[ 1.0+infj]', '[ 1.-infj]', '[ 1.-infj]', '[ 1.0-infj]', '[ 1.+nanj]', '[ 1.+nanj]', '[ 1.0+nanj]', '[-1.+0.j]', '[-1.+0.j]', '[-1.0+0.0j]', '[-1.+1.j]', '[-1.+1.j]', '[-1.0+1.0j]', '[-1.-1.j]', '[-1.-1.j]', '[-1.0-1.0j]', '[-1.+infj]', '[-1.+infj]', '[-1.0+infj]', '[-1.-infj]', '[-1.-infj]', '[-1.0-infj]', '[-1.+nanj]', '[-1.+nanj]', '[-1.0+nanj]', '[ inf+0.j]', '[ inf+0.j]', '[ inf+0.0j]', '[ inf+1.j]', '[ inf+1.j]', '[ inf+1.0j]', '[ inf-1.j]', '[ inf-1.j]', '[ inf-1.0j]', '[ inf+infj]', '[ inf+infj]', '[ inf+infj]', '[ inf-infj]', '[ inf-infj]', '[ inf-infj]', '[ inf+nanj]', '[ inf+nanj]', '[ inf+nanj]', '[-inf+0.j]', '[-inf+0.j]', '[-inf+0.0j]', '[-inf+1.j]', '[-inf+1.j]', '[-inf+1.0j]', '[-inf-1.j]', '[-inf-1.j]', '[-inf-1.0j]', '[-inf+infj]', '[-inf+infj]', '[-inf+infj]', '[-inf-infj]', '[-inf-infj]', '[-inf-infj]', '[-inf+nanj]', '[-inf+nanj]', '[-inf+nanj]', '[ nan+0.j]', '[ nan+0.j]', '[ nan+0.0j]', '[ nan+1.j]', '[ nan+1.j]', '[ nan+1.0j]', '[ nan-1.j]', '[ nan-1.j]', '[ nan-1.0j]', '[ nan+infj]', '[ nan+infj]', '[ nan+infj]', '[ nan-infj]', '[ nan-infj]', '[ nan-infj]', '[ nan+nanj]', '[ nan+nanj]', '[ nan+nanj]'] for res, val in zip(actual, wanted): assert_(res == val) class TestArray2String(TestCase): def test_basic(self): """Basic test of array2string.""" a = np.arange(3) assert_(np.array2string(a) == '[0 1 2]') assert_(np.array2string(a, max_line_width=4) == '[0 1\n 2]') def test_style_keyword(self): """This should only apply to 0-D arrays. See #1218.""" stylestr = np.array2string(np.array(1.5), style=lambda x: "Value in 0-D array: " + str(x)) assert_(stylestr == 'Value in 0-D array: 1.5') def test_format_function(self): """Test custom format function for each element in array.""" def _format_function(x): if np.abs(x) < 1: return '.' elif np.abs(x) < 2: return 'o' else: return 'O' x = np.arange(3) if sys.version_info[0] >= 3: x_hex = "[0x0 0x1 0x2]" x_oct = "[0o0 0o1 0o2]" else: x_hex = "[0x0L 0x1L 0x2L]" x_oct = "[0L 01L 02L]" assert_(np.array2string(x, formatter={'all':_format_function}) == \ "[. o O]") assert_(np.array2string(x, formatter={'int_kind':_format_function}) ==\ "[. o O]") assert_(np.array2string(x, formatter={'all':lambda x: "%.4f" % x}) == \ "[0.0000 1.0000 2.0000]") assert_equal(np.array2string(x, formatter={'int':lambda x: hex(x)}), \ x_hex) assert_equal(np.array2string(x, formatter={'int':lambda x: oct(x)}), \ x_oct) x = np.arange(3.) assert_(np.array2string(x, formatter={'float_kind':lambda x: "%.2f" % x}) == \ "[0.00 1.00 2.00]") assert_(np.array2string(x, formatter={'float':lambda x: "%.2f" % x}) == \ "[0.00 1.00 2.00]") s = np.array(['abc', 'def']) assert_(np.array2string(s, formatter={'numpystr':lambda s: s*2}) == \ '[abcabc defdef]') class TestPrintOptions: """Test getting and setting global print options.""" def setUp(self): self.oldopts = np.get_printoptions() def tearDown(self): np.set_printoptions(**self.oldopts) def test_basic(self): x = np.array([1.5, 0, 1.234567890]) assert_equal(repr(x), "array([ 1.5 , 0. , 1.23456789])") np.set_printoptions(precision=4) assert_equal(repr(x), "array([ 1.5 , 0. , 1.2346])") def test_formatter(self): x = np.arange(3) np.set_printoptions(formatter={'all':lambda x: str(x-1)}) assert_equal(repr(x), "array([-1, 0, 1])") def test_formatter_reset(self): x = np.arange(3) np.set_printoptions(formatter={'all':lambda x: str(x-1)}) assert_equal(repr(x), "array([-1, 0, 1])") np.set_printoptions(formatter={'int':None}) assert_equal(repr(x), "array([0, 1, 2])") np.set_printoptions(formatter={'all':lambda x: str(x-1)}) assert_equal(repr(x), "array([-1, 0, 1])") np.set_printoptions(formatter={'all':None}) assert_equal(repr(x), "array([0, 1, 2])") np.set_printoptions(formatter={'int':lambda x: str(x-1)}) assert_equal(repr(x), "array([-1, 0, 1])") np.set_printoptions(formatter={'int_kind':None}) assert_equal(repr(x), "array([0, 1, 2])") x = np.arange(3.) np.set_printoptions(formatter={'float':lambda x: str(x-1)}) assert_equal(repr(x), "array([-1.0, 0.0, 1.0])") np.set_printoptions(formatter={'float_kind':None}) assert_equal(repr(x), "array([ 0., 1., 2.])") def test_unicode_object_array(): import sys if sys.version_info[0] >= 3: expected = "array(['é'], dtype=object)" else: expected = "array([u'\\xe9'], dtype=object)" x = np.array([u'\xe9'], dtype=object) assert_equal(repr(x), expected) if __name__ == "__main__": run_module_suite()