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 /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
test_ctypeslib.py
3.82
KB
-rw-r--r--
2013-04-07 01:04
test_ctypeslib.pyc
4.71
KB
-rw-r--r--
2018-04-10 19:40
test_ctypeslib.pyo
4.71
KB
-rw-r--r--
2018-04-10 19:40
test_matlib.py
1.47
KB
-rw-r--r--
2013-04-07 01:04
test_matlib.pyc
2.79
KB
-rw-r--r--
2018-04-10 19:40
test_matlib.pyo
2.79
KB
-rw-r--r--
2018-04-10 19:40
Save
Rename
import numpy as np import numpy.matlib from numpy.testing import assert_array_equal, assert_ def test_empty(): x = np.matlib.empty((2,)) assert_(isinstance(x, np.matrix)) assert_(x.shape, (1,2)) def test_ones(): assert_array_equal(np.matlib.ones((2, 3)), np.matrix([[ 1., 1., 1.], [ 1., 1., 1.]])) assert_array_equal(np.matlib.ones(2), np.matrix([[ 1., 1.]])) def test_zeros(): assert_array_equal(np.matlib.zeros((2, 3)), np.matrix([[ 0., 0., 0.], [ 0., 0., 0.]])) assert_array_equal(np.matlib.zeros(2), np.matrix([[ 0., 0.]])) def test_identity(): x = np.matlib.identity(2, dtype=np.int) assert_array_equal(x, np.matrix([[1, 0], [0, 1]])) def test_eye(): x = np.matlib.eye(3, k=1, dtype=int) assert_array_equal(x, np.matrix([[ 0, 1, 0], [ 0, 0, 1], [ 0, 0, 0]])) def test_rand(): x = np.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 = np.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) if __name__ == "__main__": run_module_suite()