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.47
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 /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-r--r--
test_ctypeslib.py
11.97
KB
-rw-r--r--
test_matlib.py
1.81
KB
-rw-r--r--
test_numpy_version.py
1.54
KB
-rw-r--r--
test_public_api.py
14.67
KB
-rw-r--r--
test_reloading.py
2.16
KB
-rw-r--r--
test_scripts.py
1.54
KB
-rw-r--r--
test_warnings.py
2.23
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_matlib.py
import numpy as np import numpy.matlib from numpy.testing import assert_array_equal, assert_ def test_empty(): x = numpy.matlib.empty((2,)) assert_(isinstance(x, np.matrix)) assert_(x.shape, (1, 2)) def test_ones(): assert_array_equal(numpy.matlib.ones((2, 3)), np.matrix([[ 1., 1., 1.], [ 1., 1., 1.]])) assert_array_equal(numpy.matlib.ones(2), np.matrix([[ 1., 1.]])) def test_zeros(): assert_array_equal(numpy.matlib.zeros((2, 3)), np.matrix([[ 0., 0., 0.], [ 0., 0., 0.]])) assert_array_equal(numpy.matlib.zeros(2), np.matrix([[ 0., 0.]])) def test_identity(): x = numpy.matlib.identity(2, dtype=int) assert_array_equal(x, np.matrix([[1, 0], [0, 1]])) def test_eye(): xc = numpy.matlib.eye(3, k=1, dtype=int) assert_array_equal(xc, np.matrix([[ 0, 1, 0], [ 0, 0, 1], [ 0, 0, 0]])) assert xc.flags.c_contiguous assert not xc.flags.f_contiguous xf = numpy.matlib.eye(3, 4, dtype=int, order='F') assert_array_equal(xf, np.matrix([[ 1, 0, 0, 0], [ 0, 1, 0, 0], [ 0, 0, 1, 0]])) assert not xf.flags.c_contiguous assert xf.flags.f_contiguous def test_rand(): x = numpy.matlib.rand(3) # check matrix type, array would have shape (3,) assert_(x.ndim == 2) def test_randn(): x = np.matlib.randn(3) # check matrix type, array would have shape (3,) assert_(x.ndim == 2) def test_repmat(): a1 = np.arange(4) x = numpy.matlib.repmat(a1, 2, 2) y = np.array([[0, 1, 2, 3, 0, 1, 2, 3], [0, 1, 2, 3, 0, 1, 2, 3]]) assert_array_equal(x, y)
Close