MCPcopy Index your code
hub / github.com/numpy/numpy / test_svd_build

Method test_svd_build

numpy/linalg/tests/test_regression.py:55–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 assert_array_almost_equal(vals, rvals)
54
55 def test_svd_build(self):
56 # Ticket 627.
57 a = array([[0., 1.], [1., 1.], [2., 1.], [3., 1.]])
58 m, n = a.shape
59 u, s, vh = linalg.svd(a)
60
61 b = dot(transpose(u[:, n:]), a)
62
63 assert_array_almost_equal(b, np.zeros((2, 2)))
64
65 def test_norm_vector_badarg(self):
66 # Regression for #786: Frobenius norm for vectors raises

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
dotFunction · 0.90
transposeFunction · 0.90

Tested by

no test coverage detected