def _linear_banded_jac(t, y, a):
 (ml, mu) = _band_count(a)
 bjac = []
 for k in range(mu, 0, (-1)):
  bjac.append(np.r_[(([0] * k), np.diag(a, k))])
 bjac.append(np.diag(a))
 for k in range((-1), ((- ml) - 1), (-1)):
  bjac.append(np.r_[(np.diag(a, k), ([0] * (- k)))])
 return bjac

def _linear_banded_jac ( t , y , a ) : ( ml , mu ) = _band_count ( a ) bjac = [ ] for k in range ( mu , 0 , ( - 1 ) ) : bjac . append ( np . r_ [ ( ( [ 0 ] * k ) , np . diag ( a , k ) ) ] ) bjac . append ( np . diag ( a ) ) for k in range ( ( - 1 ) , ( ( - ml ) - 1 ) , ( - 1 ) ) : bjac . append ( np . r_ [ ( np . diag ( a , k ) , ( [ 0 ] * ( - k ) ) ) ] ) return bjac
banded jacobian .