class_docstr: Tests for cholesky_banded() and cho_solve_banded.
class_docstr_tok: ["Tests","for","cholesky_banded","(",")","and","cho_solve_banded","."]
code: def test_check_finite(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([[-1.0, 1.0, 0.5, 0.2], [4.0, 4.0, 4.0, 4.0]])
      c = cholesky_banded(ab, lower=False, check_finite=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.T, ufac))
  
      b = array([0.0, 0.5, 4.2, 4.2])
      x = cho_solve_banded((c, False), b, check_finite=False)
      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 1 for calling the TestCholeskyBanded obj's underlying member method code with example usage: obj.test_check_finite() without return types