class_docstr: Tests for cholesky_banded() and cho_solve_banded.
class_docstr_tok: ["Tests","for","cholesky_banded","(",")","and","cho_solve_banded","."]
code: def test_lower_real(self):
      # Symmetric 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.2],
              [0.0, 0.0, 0.2, 4.0],
          ]
      )
      # Banded storage form of `a`.
      ab = array([[4.0, 4.0, 4.0, 4.0], [1.0, 0.5, 0.2, -1.0]])
      c = cholesky_banded(ab, lower=True)
      lfac = zeros_like(a)
      lfac[list(range(4)), list(range(4))] = c[0]
      lfac[(1, 2, 3), (0, 1, 2)] = c[1, :3]
      assert_array_almost_equal(a, dot(lfac, lfac.T))
  
      b = array([0.0, 0.5, 4.2, 4.2])
      x = cho_solve_banded((c, True), b)
      assert_array_almost_equal(x, [0.0, 0.0, 1.0, 1.0])
  
imports: from __future__ import division, print_function, absolute_import
  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 4 for calling the TestCholeskyBanded obj's underlying member method code with example usage: obj.test_lower_real() without return types