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

Method test_svd_no_uv

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

Source from the content-addressed store, hash-verified

77 np.linalg.svd(x)
78
79 def test_svd_no_uv(self):
80 # gh-4733
81 for shape in (3, 4), (4, 4), (4, 3):
82 for t in float, complex:
83 a = np.ones(shape, dtype=t)
84 w = linalg.svd(a, compute_uv=False)
85 c = np.count_nonzero(np.absolute(w) > 0.5)
86 assert_equal(c, 1)
87 assert_equal(np.linalg.matrix_rank(a), 1)
88 assert_array_less(1, np.linalg.norm(a, ord=2))
89
90 def test_norm_object_array(self):
91 # gh-7575

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
assert_array_lessFunction · 0.90

Tested by

no test coverage detected