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

Method test_svd_no_uv

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

Source from the content-addressed store, hash-verified

83 np.linalg.svd(x)
84
85 def test_svd_no_uv(self):
86 # gh-4733
87 for shape in (3, 4), (4, 4), (4, 3):
88 for t in float, complex:
89 a = np.ones(shape, dtype=t)
90 w = linalg.svd(a, compute_uv=False)
91 c = np.count_nonzero(np.absolute(w) > 0.5)
92 assert_equal(c, 1)
93 assert_equal(np.linalg.matrix_rank(a), 1)
94 assert_array_less(1, np.linalg.norm(a, ord=2))
95
96 w_svdvals = linalg.svdvals(a)
97 assert_array_almost_equal(w, w_svdvals)
98
99 def test_norm_object_array(self):
100 # gh-7575

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
assert_array_lessFunction · 0.90

Tested by

no test coverage detected