code: def cho_solve_banded(
      cb_and_lower, b, overwrite_b=False, check_finite=True
  ):
      """
      Solve the linear equations ``A x = b``, given the Cholesky factorization of
      the banded hermitian ``A``.
  
      Parameters
      ----------
      (cb, lower) : tuple, (ndarray, bool)
          `cb` is the Cholesky factorization of A, as given by cholesky_banded.
          `lower` must be the same value that was given to cholesky_banded.
      b : array_like
          Right-hand side
      overwrite_b : bool, optional
          If True, the function will overwrite the values in `b`.
      check_finite : bool, optional
          Whether to check that the input matrices contain only finite numbers.
          Disabling may give a performance gain, but may result in problems
          (crashes, non-termination) if the inputs do contain infinities or NaNs.
  
      Returns
      -------
      x : array
          The solution to the system A x = b
  
      See also
      --------
      cholesky_banded : Cholesky factorization of a banded matrix
  
      Notes
      -----
  
      .. versionadded:: 0.8.0
  
      Examples
      --------
      >>> from scipy.linalg import cholesky_banded, cho_solve_banded
      >>> Ab = np.array([[0, 0, 1j, 2, 3j], [0, -1, -2, 3, 4], [9, 8, 7, 6, 9]])
      >>> A = np.diag(Ab[0,2:], k=2) + np.diag(Ab[1,1:], k=1)
      >>> A = A + A.conj().T + np.diag(Ab[2, :])
      >>> c = cholesky_banded(Ab)
      >>> x = cho_solve_banded((c, False), np.ones(5))
      >>> np.allclose(A @ x - np.ones(5), np.zeros(5))
      True
  
      """
      (cb, lower) = cb_and_lower
      if check_finite:
          cb = asarray_chkfinite(cb)
          b = asarray_chkfinite(b)
      else:
          cb = asarray(cb)
          b = asarray(b)
  
      # Validate shapes.
      if cb.shape[-1] != b.shape[0]:
          raise ValueError("shapes of cb and b are not compatible.")
  
      (pbtrs,) = get_lapack_funcs(("pbtrs",), (cb, b))
      x, info = pbtrs(cb, b, lower=lower, overwrite_b=overwrite_b)
      if info > 0:
          raise LinAlgError(
              "%d-th leading minor not positive definite" % info
          )
      if info < 0:
          raise ValueError(
              "illegal value in %d-th argument of internal pbtrs"
              % -info
          )
      return x
  
file_path: catboost/contrib/python/scipy/py2/scipy/linalg/decomp_cholesky.py
imports: from __future__ import division, print_function, absolute_import
  from numpy import asarray_chkfinite, asarray, atleast_2d
  from .misc import LinAlgError, _datacopied
  from .lapack import get_lapack_funcs
label_desc: Use image node_id 6 for calling a global function with example usage: cho_solve_banded(cb_and_lower, b, overwrite_b, check_finite) and returns: x