class_docstr: Tests for cholesky_banded() and cho_solve_banded.
class_docstr_tok: ["Tests","for","cholesky_banded","(",")","and","cho_solve_banded","."]
code: def test_upper_complex(self):
      # Hermitian positive definite banded matrix `a`
      a = array(
          [
              [4.0, 1.0, 0.0, 0.0],
              [1.0, 4.0, 0.5, 0.0],
              [0.0, 0.5, 4.0, -0.2j],
              [0.0, 0.0, 0.2j, 4.0],
          ]
      )
      # Banded storage form of `a`.
      ab = array([[-1.0, 1.0, 0.5, -0.2j], [4.0, 4.0, 4.0, 4.0]])
      c = cholesky_banded(ab, lower=False)
      ufac = zeros_like(a)
      ufac[list(range(4)), list(range(4))] = c[-1]
      ufac[(0, 1, 2), (1, 2, 3)] = c[0, 1:]
      assert_array_almost_equal(a, dot(ufac.conj().T, ufac))
  
      b = array([0.0, 0.5, 4.0 - 0.2j, 0.2j + 4.0])
      x = cho_solve_banded((c, False), b)
      assert_array_almost_equal(x, [0.0, 0.0, 1.0, 1.0])
  
imports: from numpy.testing import assert_array_almost_equal, assert_array_equal
  from pytest import raises
  from numpy import array, transpose, dot, conjugate, zeros_like, empty
  from numpy.random import random
  from scipy.linalg import cholesky, cholesky_banded, cho_solve_banded, cho_factor, cho_solve
  from scipy.linalg._testutils import assert_no_overwrite
label_desc: Use image node_id 3 for calling the TestCholeskyBanded obj's underlying member method code with example usage: obj.test_upper_complex() without return types