parameters: (Ainv,v,w,c=1.0)
docstring: Computes (A+vcw^T)^-1 given A^-1, w, and w.
      Does it inplace without creating a temp matrix
docstring_summary: Computes (A+vcw^T)^-1 given A^-1, w, and w.
      Does it inplace without creating a temp matrix
docstring_tokens: Computes ( A + vcw^T ) ^ - 1 given A^ - 1 w and w . Does it inplace without creating a temp matrix
function: def sherman_woodbury_inplace(Ainv,v,w,c=1.0):
      """Computes (A+vcw^T)^-1 given A^-1, w, and w.
      Does it inplace without creating a temp matrix"""
      if v is w:
          temp = np.dot(Ainv,v)
          den = 1.0+np.dot(v,temp)*c
          scale = c/den
          for i in range(Ainv.shape[0]):
              Ainv[i,:] -= (scale*temp[i])*temp
      else:
          AinvV = np.dot(Ainv,v)
          AinvW = np.dot(Ainv,w)
          scale = c/(1.0+np.dot(v,AinvW)*c)
          for i in range(Ainv.shape[0]):
              Ainv[i,:] -= (scale*AinvV[i])*AinvW
function_tokens: def sherman_woodbury_inplace ( Ainv , v , w , c = 1.0 ) : if v is w : temp = np . dot ( Ainv , v ) den = 1.0 + np . dot ( v , temp ) * c scale = c / den for i in range ( Ainv . shape [ 0 ] ) : Ainv [ i , : ] -= ( scale * temp [ i ] ) * temp else : AinvV = np . dot ( Ainv , v ) AinvW = np . dot ( Ainv , w ) scale = c / ( 1.0 + np . dot ( v , AinvW ) * c ) for i in range ( Ainv . shape [ 0 ] ) : Ainv [ i , : ] -= ( scale * AinvV [ i ] ) * AinvW