def cholesky_banded(ab, overwrite_ab=False, lower=False, check_finite=True):
 if check_finite:
  ab = asarray_chkfinite(ab)
 else:
  ab = asarray(ab)
 (pbtrf,) = get_lapack_funcs(('pbtrf',), (ab,))
 (c, info) = pbtrf(ab, lower=lower, overwrite_ab=overwrite_ab)
 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 pbtrf' % (- info)))
 return c

def cholesky_banded ( ab , overwrite_ab = False , lower = False , check_finite = True ) : if check_finite : ab = asarray_chkfinite ( ab ) else : ab = asarray ( ab ) ( pbtrf , ) = get_lapack_funcs ( ( 'pbtrf' , ) , ( ab , ) ) ( c , info ) = pbtrf ( ab , lower = lower , overwrite_ab = overwrite_ab ) 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 pbtrf' % ( - info ) ) ) return c
cholesky decompose a banded hermitian positive-definite matrix the matrix a is stored in ab either in lower diagonal or upper diagonal ordered form:: ab[u + i - j .