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 import numpy as np from numpy.testing import * from numpy.testing.utils import WarningManager import warnings def test_fastCopyAndTranspose(): # 0D array a = np.array(2) b = np.fastCopyAndTranspose(a) assert_equal(b, a.T) assert_(b.flags.owndata) # 1D array a = np.array([3,2,7,0]) b = np.fastCopyAndTranspose(a) assert_equal(b, a.T) assert_(b.flags.owndata) # 2D array a = np.arange(6).reshape(2,3) b = np.fastCopyAndTranspose(a) assert_equal(b, a.T) assert_(b.flags.owndata) def test_array_astype(): a = np.arange(6, dtype='f4').reshape(2,3) # Default behavior: allows unsafe casts, keeps memory layout, # always copies. b = a.astype('i4') assert_equal(a, b) assert_equal(b.dtype, np.dtype('i4')) assert_equal(a.strides, b.strides) b = a.T.astype('i4') assert_equal(a.T, b) assert_equal(b.dtype, np.dtype('i4')) assert_equal(a.T.strides, b.strides) b = a.astype('f4') assert_equal(a, b) assert_(not (a is b)) # copy=False parameter can sometimes skip a copy b = a.astype('f4', copy=False) assert_(a is b) # order parameter allows overriding of the memory layout, # forcing a copy if the layout is wrong b = a.astype('f4', order='F', copy=False) assert_equal(a, b) assert_(not (a is b)) assert_(b.flags.f_contiguous) b = a.astype('f4', order='C', copy=False) assert_equal(a, b) assert_(a is b) assert_(b.flags.c_contiguous) # casting parameter allows catching bad casts b = a.astype('c8', casting='safe') assert_equal(a, b) assert_equal(b.dtype, np.dtype('c8')) assert_raises(TypeError, a.astype, 'i4', casting='safe') # subok=False passes through a non-subclassed array b = a.astype('f4', subok=0, copy=False) assert_(a is b) a = np.matrix([[0,1,2],[3,4,5]], dtype='f4') # subok=True passes through a matrix b = a.astype('f4', subok=True, copy=False) assert_(a is b) # subok=True is default, and creates a subtype on a cast b = a.astype('i4', copy=False) assert_equal(a, b) assert_equal(type(b), np.matrix) # subok=False never returns a matrix b = a.astype('f4', subok=False, copy=False) assert_equal(a, b) assert_(not (a is b)) assert_(type(b) != np.matrix) def test_copyto_fromscalar(): a = np.arange(6, dtype='f4').reshape(2,3) # Simple copy np.copyto(a, 1.5) assert_equal(a, 1.5) np.copyto(a.T, 2.5) assert_equal(a, 2.5) # Where-masked copy mask = np.array([[0,1,0],[0,0,1]], dtype='?') np.copyto(a, 3.5, where=mask) assert_equal(a, [[2.5,3.5,2.5],[2.5,2.5,3.5]]) mask = np.array([[0,1],[1,1],[1,0]], dtype='?') np.copyto(a.T, 4.5, where=mask) assert_equal(a, [[2.5,4.5,4.5],[4.5,4.5,3.5]]) def test_copyto(): a = np.arange(6, dtype='i4').reshape(2,3) # Simple copy np.copyto(a, [[3,1,5], [6,2,1]]) assert_equal(a, [[3,1,5], [6,2,1]]) # Overlapping copy should work np.copyto(a[:,:2], a[::-1, 1::-1]) assert_equal(a, [[2,6,5], [1,3,1]]) # Defaults to 'same_kind' casting assert_raises(TypeError, np.copyto, a, 1.5) # Force a copy with 'unsafe' casting, truncating 1.5 to 1 np.copyto(a, 1.5, casting='unsafe') assert_equal(a, 1) # Copying with a mask np.copyto(a, 3, where=[True,False,True]) assert_equal(a, [[3,1,3],[3,1,3]]) # Casting rule still applies with a mask assert_raises(TypeError, np.copyto, a, 3.5, where=[True,False,True]) # Lists of integer 0's and 1's is ok too np.copyto(a, 4.0, casting='unsafe', where=[[0,1,1], [1,0,0]]) assert_equal(a, [[3,4,4], [4,1,3]]) # Overlapping copy with mask should work np.copyto(a[:,:2], a[::-1, 1::-1], where=[[0,1],[1,1]]) assert_equal(a, [[3,4,4], [4,3,3]]) # 'dst' must be an array assert_raises(TypeError, np.copyto, [1,2,3], [2,3,4]) def test_copy_order(): a = np.arange(24).reshape(2,1,3,4) b = a.copy(order='F') c = np.arange(24).reshape(2,1,4,3).swapaxes(2,3) def check_copy_result(x, y, ccontig, fcontig, strides=False): assert_(not (x is y)) assert_equal(x, y) assert_equal(res.flags.c_contiguous, ccontig) assert_equal(res.flags.f_contiguous, fcontig) if strides: assert_equal(x.strides, y.strides) else: assert_(x.strides != y.strides) # Validate the initial state of a, b, and c assert_(a.flags.c_contiguous) assert_(not a.flags.f_contiguous) assert_(not b.flags.c_contiguous) assert_(b.flags.f_contiguous) assert_(not c.flags.c_contiguous) assert_(not c.flags.f_contiguous) # Copy with order='C' res = a.copy(order='C') check_copy_result(res, a, ccontig=True, fcontig=False, strides=True) res = b.copy(order='C') check_copy_result(res, b, ccontig=True, fcontig=False, strides=False) res = c.copy(order='C') check_copy_result(res, c, ccontig=True, fcontig=False, strides=False) res = np.copy(a, order='C') check_copy_result(res, a, ccontig=True, fcontig=False, strides=True) res = np.copy(b, order='C') check_copy_result(res, b, ccontig=True, fcontig=False, strides=False) res = np.copy(c, order='C') check_copy_result(res, c, ccontig=True, fcontig=False, strides=False) # Copy with order='F' res = a.copy(order='F') check_copy_result(res, a, ccontig=False, fcontig=True, strides=False) res = b.copy(order='F') check_copy_result(res, b, ccontig=False, fcontig=True, strides=True) res = c.copy(order='F') check_copy_result(res, c, ccontig=False, fcontig=True, strides=False) res = np.copy(a, order='F') check_copy_result(res, a, ccontig=False, fcontig=True, strides=False) res = np.copy(b, order='F') check_copy_result(res, b, ccontig=False, fcontig=True, strides=True) res = np.copy(c, order='F') check_copy_result(res, c, ccontig=False, fcontig=True, strides=False) # Copy with order='K' res = a.copy(order='K') check_copy_result(res, a, ccontig=True, fcontig=False, strides=True) res = b.copy(order='K') check_copy_result(res, b, ccontig=False, fcontig=True, strides=True) res = c.copy(order='K') check_copy_result(res, c, ccontig=False, fcontig=False, strides=True) res = np.copy(a, order='K') check_copy_result(res, a, ccontig=True, fcontig=False, strides=True) res = np.copy(b, order='K') check_copy_result(res, b, ccontig=False, fcontig=True, strides=True) res = np.copy(c, order='K') check_copy_result(res, c, ccontig=False, fcontig=False, strides=True) if __name__ == "__main__": run_module_suite()