parameters: (v, alpha, cs, ds)
return_statement: return w
docstring: Evaluate w = M^-1 v
docstring_summary: Evaluate w = M^-1 v
docstring_tokens: Evaluate w = M^ - 1 v
function: def _solve(v, alpha, cs, ds):
          """Evaluate w = M^-1 v"""
          if len(cs) == 0:
              return v/alpha
  
          # (B + C D^H)^-1 = B^-1 - B^-1 C (I + D^H B^-1 C)^-1 D^H B^-1
  
          axpy, dotc = get_blas_funcs(['axpy', 'dotc'], cs[:1] + [v])
  
          c0 = cs[0]
          A = alpha * np.identity(len(cs), dtype=c0.dtype)
          for i, d in enumerate(ds):
              for j, c in enumerate(cs):
                  A[i,j] += dotc(d, c)
  
          q = np.zeros(len(cs), dtype=c0.dtype)
          for j, d in enumerate(ds):
              q[j] = dotc(d, v)
          q /= alpha
          q = solve(A, q)
  
          w = v/alpha
          for c, qc in zip(cs, q):
              w = axpy(c, w, w.size, -qc)
  
          return w
function_tokens: def _solve ( v , alpha , cs , ds ) : if len ( cs ) == 0 : return v / alpha # (B + C D^H)^-1 = B^-1 - B^-1 C (I + D^H B^-1 C)^-1 D^H B^-1 axpy , dotc = get_blas_funcs ( [ 'axpy' , 'dotc' ] , cs [ : 1 ] + [ v ] ) c0 = cs [ 0 ] A = alpha * np . identity ( len ( cs ) , dtype = c0 . dtype ) for i , d in enumerate ( ds ) : for j , c in enumerate ( cs ) : A [ i , j ] += dotc ( d , c ) q = np . zeros ( len ( cs ) , dtype = c0 . dtype ) for j , d in enumerate ( ds ) : q [ j ] = dotc ( d , v ) q /= alpha q = solve ( A , q ) w = v / alpha for c , qc in zip ( cs , q ) : w = axpy ( c , w , w . size , - qc ) return w