$16 GRAYBYTE WORDPRESS FILE MANAGER $43

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/matrixlib/tests/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/matrixlib/tests//test_regression.py
import numpy as np
from numpy.testing import assert_, assert_equal, assert_raises


class TestRegression:
    def test_kron_matrix(self):
        # Ticket #71
        x = np.matrix('[1 0; 1 0]')
        assert_equal(type(np.kron(x, x)), type(x))

    def test_matrix_properties(self):
        # Ticket #125
        a = np.matrix([1.0], dtype=float)
        assert_(type(a.real) is np.matrix)
        assert_(type(a.imag) is np.matrix)
        c, d = np.matrix([0.0]).nonzero()
        assert_(type(c) is np.ndarray)
        assert_(type(d) is np.ndarray)

    def test_matrix_multiply_by_1d_vector(self):
        # Ticket #473
        def mul():
            np.mat(np.eye(2))*np.ones(2)

        assert_raises(ValueError, mul)

    def test_matrix_std_argmax(self):
        # Ticket #83
        x = np.asmatrix(np.random.uniform(0, 1, (3, 3)))
        assert_equal(x.std().shape, ())
        assert_equal(x.argmax().shape, ())

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Aug 2025 9.24 PM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
0 KB
17 Apr 2025 8.10 PM
root / root
0644
test_defmatrix.py
14.631 KB
17 Apr 2025 8.10 PM
root / root
0644
test_interaction.py
11.597 KB
17 Apr 2025 8.10 PM
root / root
0644
test_masked_matrix.py
8.723 KB
17 Apr 2025 8.10 PM
root / root
0644
test_matrix_linalg.py
2.011 KB
17 Apr 2025 8.10 PM
root / root
0644
test_multiarray.py
0.541 KB
17 Apr 2025 8.10 PM
root / root
0644
test_numeric.py
0.431 KB
17 Apr 2025 8.10 PM
root / root
0644
test_regression.py
0.905 KB
17 Apr 2025 8.10 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF