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

Method test_svd_build

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

Source from the content-addressed store, hash-verified

47 assert_array_almost_equal(vals, rvals)
48
49 def test_svd_build(self):
50 # Ticket 627.
51 a = array([[0., 1.], [1., 1.], [2., 1.], [3., 1.]])
52 m, n = a.shape
53 u, s, vh = linalg.svd(a)
54
55 b = dot(transpose(u[:, n:]), a)
56
57 assert_array_almost_equal(b, np.zeros((2, 2)))
58
59 def test_norm_vector_badarg(self):
60 # 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