code: def test_solve_3d_symmetric_positive_definite():
      # Select some arbitrary right-hand sides
      bs = [
          np.array([1.1, 2.2, 3.3]),
          np.array([1e-2, 3e-3, 2e-2]),
          np.array([1e2, 1e3, 5e-2]),
          np.array([1e-5, 1e5, 1.0]),
      ]
  
      # Select arbitrary taus
      taus = [0.0, 1.0, 1e-4, 1e5]
  
      # Select arbitrary matrices
      gs = []
  
      # diagonal
      diag = np.array([0.0, 0.0, 0.0])
      gs.append(diag)
  
      # canonical basis
      gs.append(np.array([1.0, 0.0, 0.0]))
      gs.append(np.array([0.0, 1.0, 0.0]))
      gs.append(np.array([0.0, 0.0, 1.0]))
  
      # other
      gs.append(np.array([1.0, 0.5, 0.0]))
      gs.append(np.array([0.0, 0.2, 0.1]))
      gs.append(np.array([0.3, 0.0, 0.9]))
  
      for g in gs:
          A = g[:, None] * g[None, :]
          for tau in taus:
              AA = A + tau * np.eye(3)
              for b in bs:
                  (
                      actual,
                      is_singular,
                  ) = ssd.solve_3d_symmetric_positive_definite(
                      g, b, tau
                  )
                  if tau == 0.0:
                      assert_equal(is_singular, 1)
                  else:
                      expected = np.linalg.solve(AA, b)
                      assert_allclose(
                          expected, actual, rtol=1e-9, atol=1e-9
                      )
  
file_path: dipy/dipy/align/tests/test_sumsqdiff.py
imports: import numpy
  from dipy.align import floating
  from dipy.align import sumsqdiff
  from numpy.testing import assert_equal, assert_almost_equal, assert_array_almost_equal, assert_allclose
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 6 for calling a global function with example usage: test_solve_3d_symmetric_positive_definite() without return types