MCPcopy Create free account
hub / github.com/numpy/numpy / test_matrix_properties

Method test_matrix_properties

numpy/matrixlib/tests/test_regression.py:11–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9 assert_equal(type(np.kron(x, x)), type(x))
10
11 def test_matrix_properties(self):
12 # Ticket #125
13 a = np.matrix([1.0], dtype=float)
14 assert_(type(a.real) is np.matrix)
15 assert_(type(a.imag) is np.matrix)
16 c, d = np.matrix([0.0]).nonzero()
17 assert_(type(c) is np.ndarray)
18 assert_(type(d) is np.ndarray)
19
20 def test_matrix_multiply_by_1d_vector(self):
21 # Ticket #473

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
nonzeroMethod · 0.80

Tested by

no test coverage detected