docstr: Tests SVD with rank-deficient input.
docstr_tok: ["Tests","SVD","with","rank-deficient","input","."]
code: def testSvdWithOnRankDeficientInput(self, m, r, log_cond):
      """Tests SVD with rank-deficient input."""
      with jax.default_matmul_precision("float32"):
          a = jnp.triu(jnp.ones((m, m))).astype(_SVD_TEST_DTYPE)
  
          # Generates a rank-deficient input.
          u, s, v = jnp.linalg.svd(a, full_matrices=False)
          cond = 10**log_cond
          s = jnp.linspace(cond, 1, m)
          s = s.at[r:m].set(0)
          a = (u * s) @ v
  
          with jax.default_matmul_precision("float32"):
              u, s, v = svd.svd(a, full_matrices=False, hermitian=False)
          diff = np.linalg.norm(a - (u * s) @ v)
  
          np.testing.assert_almost_equal(diff, 1e-4, decimal=2)
  
file_path: jax/tests/svd_test.py
imports: import functools
  import jax
  import jax.numpy
  import numpy
  import scipy.linalg
  from jax._src import config
  from jax._src import test_util
  from jax._src.lax import svd
  from absl.testing import absltest
label_desc: Use image node_id 4 for calling the SvdTest obj's underlying member method code with example usage: obj.testSvdWithOnRankDeficientInput(m, r, log_cond) without return types