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
import sys from numpy.testing import * from numpy.core import * from numpy.compat import asbytes # Guess the UCS length for this python interpreter if sys.version_info[:2] >= (3, 3): # Python 3.3 uses a flexible string representation ucs4 = False def buffer_length(arr): if isinstance(arr, unicode): arr = str(arr) return (sys.getsizeof(arr+"a") - sys.getsizeof(arr)) * len(arr) v = memoryview(arr) if v.shape is None: return len(v) * v.itemsize else: return prod(v.shape) * v.itemsize elif sys.version_info[0] >= 3: import array as _array ucs4 = (_array.array('u').itemsize == 4) def buffer_length(arr): if isinstance(arr, unicode): return _array.array('u').itemsize * len(arr) v = memoryview(arr) if v.shape is None: return len(v) * v.itemsize else: return prod(v.shape) * v.itemsize else: if len(buffer(u'u')) == 4: ucs4 = True else: ucs4 = False def buffer_length(arr): if isinstance(arr, ndarray): return len(arr.data) return len(buffer(arr)) # In both cases below we need to make sure that the byte swapped value (as # UCS4) is still a valid unicode: # Value that can be represented in UCS2 interpreters ucs2_value = u'\u0900' # Value that cannot be represented in UCS2 interpreters (but can in UCS4) ucs4_value = u'\U00100900' ############################################################ # Creation tests ############################################################ class create_zeros(object): """Check the creation of zero-valued arrays""" def content_check(self, ua, ua_scalar, nbytes): # Check the length of the unicode base type self.assertTrue(int(ua.dtype.str[2:]) == self.ulen) # Check the length of the data buffer self.assertTrue(buffer_length(ua) == nbytes) # Small check that data in array element is ok self.assertTrue(ua_scalar == u'') # Encode to ascii and double check self.assertTrue(ua_scalar.encode('ascii') == asbytes('')) # Check buffer lengths for scalars if ucs4: self.assertTrue(buffer_length(ua_scalar) == 0) else: self.assertTrue(buffer_length(ua_scalar) == 0) def test_zeros0D(self): """Check creation of 0-dimensional objects""" ua = zeros((), dtype='U%s' % self.ulen) self.content_check(ua, ua[()], 4*self.ulen) def test_zerosSD(self): """Check creation of single-dimensional objects""" ua = zeros((2,), dtype='U%s' % self.ulen) self.content_check(ua, ua[0], 4*self.ulen*2) self.content_check(ua, ua[1], 4*self.ulen*2) def test_zerosMD(self): """Check creation of multi-dimensional objects""" ua = zeros((2,3,4), dtype='U%s' % self.ulen) self.content_check(ua, ua[0,0,0], 4*self.ulen*2*3*4) self.content_check(ua, ua[-1,-1,-1], 4*self.ulen*2*3*4) class test_create_zeros_1(create_zeros, TestCase): """Check the creation of zero-valued arrays (size 1)""" ulen = 1 class test_create_zeros_2(create_zeros, TestCase): """Check the creation of zero-valued arrays (size 2)""" ulen = 2 class test_create_zeros_1009(create_zeros, TestCase): """Check the creation of zero-valued arrays (size 1009)""" ulen = 1009 class create_values(object): """Check the creation of unicode arrays with values""" def content_check(self, ua, ua_scalar, nbytes): # Check the length of the unicode base type self.assertTrue(int(ua.dtype.str[2:]) == self.ulen) # Check the length of the data buffer self.assertTrue(buffer_length(ua) == nbytes) # Small check that data in array element is ok self.assertTrue(ua_scalar == self.ucs_value*self.ulen) # Encode to UTF-8 and double check self.assertTrue(ua_scalar.encode('utf-8') == \ (self.ucs_value*self.ulen).encode('utf-8')) # Check buffer lengths for scalars if ucs4: self.assertTrue(buffer_length(ua_scalar) == 4*self.ulen) else: if self.ucs_value == ucs4_value: # In UCS2, the \U0010FFFF will be represented using a # surrogate *pair* self.assertTrue(buffer_length(ua_scalar) == 2*2*self.ulen) else: # In UCS2, the \uFFFF will be represented using a # regular 2-byte word self.assertTrue(buffer_length(ua_scalar) == 2*self.ulen) def test_values0D(self): """Check creation of 0-dimensional objects with values""" ua = array(self.ucs_value*self.ulen, dtype='U%s' % self.ulen) self.content_check(ua, ua[()], 4*self.ulen) def test_valuesSD(self): """Check creation of single-dimensional objects with values""" ua = array([self.ucs_value*self.ulen]*2, dtype='U%s' % self.ulen) self.content_check(ua, ua[0], 4*self.ulen*2) self.content_check(ua, ua[1], 4*self.ulen*2) def test_valuesMD(self): """Check creation of multi-dimensional objects with values""" ua = array([[[self.ucs_value*self.ulen]*2]*3]*4, dtype='U%s' % self.ulen) self.content_check(ua, ua[0,0,0], 4*self.ulen*2*3*4) self.content_check(ua, ua[-1,-1,-1], 4*self.ulen*2*3*4) class test_create_values_1_ucs2(create_values, TestCase): """Check the creation of valued arrays (size 1, UCS2 values)""" ulen = 1 ucs_value = ucs2_value class test_create_values_1_ucs4(create_values, TestCase): """Check the creation of valued arrays (size 1, UCS4 values)""" ulen = 1 ucs_value = ucs4_value class test_create_values_2_ucs2(create_values, TestCase): """Check the creation of valued arrays (size 2, UCS2 values)""" ulen = 2 ucs_value = ucs2_value class test_create_values_2_ucs4(create_values, TestCase): """Check the creation of valued arrays (size 2, UCS4 values)""" ulen = 2 ucs_value = ucs4_value class test_create_values_1009_ucs2(create_values, TestCase): """Check the creation of valued arrays (size 1009, UCS2 values)""" ulen = 1009 ucs_value = ucs2_value class test_create_values_1009_ucs4(create_values, TestCase): """Check the creation of valued arrays (size 1009, UCS4 values)""" ulen = 1009 ucs_value = ucs4_value ############################################################ # Assignment tests ############################################################ class assign_values(object): """Check the assignment of unicode arrays with values""" def content_check(self, ua, ua_scalar, nbytes): # Check the length of the unicode base type self.assertTrue(int(ua.dtype.str[2:]) == self.ulen) # Check the length of the data buffer self.assertTrue(buffer_length(ua) == nbytes) # Small check that data in array element is ok self.assertTrue(ua_scalar == self.ucs_value*self.ulen) # Encode to UTF-8 and double check self.assertTrue(ua_scalar.encode('utf-8') == \ (self.ucs_value*self.ulen).encode('utf-8')) # Check buffer lengths for scalars if ucs4: self.assertTrue(buffer_length(ua_scalar) == 4*self.ulen) else: if self.ucs_value == ucs4_value: # In UCS2, the \U0010FFFF will be represented using a # surrogate *pair* self.assertTrue(buffer_length(ua_scalar) == 2*2*self.ulen) else: # In UCS2, the \uFFFF will be represented using a # regular 2-byte word self.assertTrue(buffer_length(ua_scalar) == 2*self.ulen) def test_values0D(self): """Check assignment of 0-dimensional objects with values""" ua = zeros((), dtype='U%s' % self.ulen) ua[()] = self.ucs_value*self.ulen self.content_check(ua, ua[()], 4*self.ulen) def test_valuesSD(self): """Check assignment of single-dimensional objects with values""" ua = zeros((2,), dtype='U%s' % self.ulen) ua[0] = self.ucs_value*self.ulen self.content_check(ua, ua[0], 4*self.ulen*2) ua[1] = self.ucs_value*self.ulen self.content_check(ua, ua[1], 4*self.ulen*2) def test_valuesMD(self): """Check assignment of multi-dimensional objects with values""" ua = zeros((2,3,4), dtype='U%s' % self.ulen) ua[0,0,0] = self.ucs_value*self.ulen self.content_check(ua, ua[0,0,0], 4*self.ulen*2*3*4) ua[-1,-1,-1] = self.ucs_value*self.ulen self.content_check(ua, ua[-1,-1,-1], 4*self.ulen*2*3*4) class test_assign_values_1_ucs2(assign_values, TestCase): """Check the assignment of valued arrays (size 1, UCS2 values)""" ulen = 1 ucs_value = ucs2_value class test_assign_values_1_ucs4(assign_values, TestCase): """Check the assignment of valued arrays (size 1, UCS4 values)""" ulen = 1 ucs_value = ucs4_value class test_assign_values_2_ucs2(assign_values, TestCase): """Check the assignment of valued arrays (size 2, UCS2 values)""" ulen = 2 ucs_value = ucs2_value class test_assign_values_2_ucs4(assign_values, TestCase): """Check the assignment of valued arrays (size 2, UCS4 values)""" ulen = 2 ucs_value = ucs4_value class test_assign_values_1009_ucs2(assign_values, TestCase): """Check the assignment of valued arrays (size 1009, UCS2 values)""" ulen = 1009 ucs_value = ucs2_value class test_assign_values_1009_ucs4(assign_values, TestCase): """Check the assignment of valued arrays (size 1009, UCS4 values)""" ulen = 1009 ucs_value = ucs4_value ############################################################ # Byteorder tests ############################################################ class byteorder_values: """Check the byteorder of unicode arrays in round-trip conversions""" def test_values0D(self): """Check byteorder of 0-dimensional objects""" ua = array(self.ucs_value*self.ulen, dtype='U%s' % self.ulen) ua2 = ua.newbyteorder() # This changes the interpretation of the data region (but not the # actual data), therefore the returned scalars are not # the same (they are byte-swapped versions of each other). self.assertTrue(ua[()] != ua2[()]) ua3 = ua2.newbyteorder() # Arrays must be equal after the round-trip assert_equal(ua, ua3) def test_valuesSD(self): """Check byteorder of single-dimensional objects""" ua = array([self.ucs_value*self.ulen]*2, dtype='U%s' % self.ulen) ua2 = ua.newbyteorder() self.assertTrue(ua[0] != ua2[0]) self.assertTrue(ua[-1] != ua2[-1]) ua3 = ua2.newbyteorder() # Arrays must be equal after the round-trip assert_equal(ua, ua3) def test_valuesMD(self): """Check byteorder of multi-dimensional objects""" ua = array([[[self.ucs_value*self.ulen]*2]*3]*4, dtype='U%s' % self.ulen) ua2 = ua.newbyteorder() self.assertTrue(ua[0,0,0] != ua2[0,0,0]) self.assertTrue(ua[-1,-1,-1] != ua2[-1,-1,-1]) ua3 = ua2.newbyteorder() # Arrays must be equal after the round-trip assert_equal(ua, ua3) class test_byteorder_1_ucs2(byteorder_values, TestCase): """Check the byteorder in unicode (size 1, UCS2 values)""" ulen = 1 ucs_value = ucs2_value class test_byteorder_1_ucs4(byteorder_values, TestCase): """Check the byteorder in unicode (size 1, UCS4 values)""" ulen = 1 ucs_value = ucs4_value class test_byteorder_2_ucs2(byteorder_values, TestCase): """Check the byteorder in unicode (size 2, UCS2 values)""" ulen = 2 ucs_value = ucs2_value class test_byteorder_2_ucs4(byteorder_values, TestCase): """Check the byteorder in unicode (size 2, UCS4 values)""" ulen = 2 ucs_value = ucs4_value class test_byteorder_1009_ucs2(byteorder_values, TestCase): """Check the byteorder in unicode (size 1009, UCS2 values)""" ulen = 1009 ucs_value = ucs2_value class test_byteorder_1009_ucs4(byteorder_values, TestCase): """Check the byteorder in unicode (size 1009, UCS4 values)""" ulen = 1009 ucs_value = ucs4_value if __name__ == "__main__": run_module_suite()