MCPcopy
hub / github.com/numpy/numpy / test_pinv

Method test_pinv

numpy/matrixlib/tests/test_defmatrix.py:146–151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

144 assert_(np.all(np.array(np.transpose(B).conj() == mB.H)))
145
146 def test_pinv(self):
147 x = matrix(np.arange(6).reshape(2, 3))
148 xpinv = matrix([[-0.77777778, 0.27777778],
149 [-0.11111111, 0.11111111],
150 [ 0.55555556, -0.05555556]])
151 assert_almost_equal(x.I, xpinv)
152
153 def test_comparisons(self):
154 A = np.arange(100).reshape(10, 10)

Callers

nothing calls this directly

Calls 3

matrixClass · 0.90
assert_almost_equalFunction · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected