parameters: (a)
return_statement: return (l, u)
docstring: Performe LU decomposition on the matrix a so A = L*U
docstring_summary: Performe LU decomposition on the matrix a so A = L*U
docstring_tokens: Performe LU decomposition on the matrix a so A = L * U
function: def lu(a):
      """
      Performe LU decomposition on the matrix a so A = L*U
      """
      u = a.copy()
      l = np.zeros_like(a)
      np.diagonal(l)[:] = 1.0
      for c in range(1, u.shape[0]):
          l[c:, c - 1] = (u[c:, c - 1] / u[c - 1, c - 1:c])
          u[c:, c - 1:] = u[c:, c - 1:] - l[c:, c - 1][:, None] * u[c - 1, c - 1:]
          np.flush()
      return (l, u)
function_tokens: def lu ( a ) : u = a . copy ( ) l = np . zeros_like ( a ) np . diagonal ( l ) [ : ] = 1.0 for c in range ( 1 , u . shape [ 0 ] ) : l [ c : , c - 1 ] = ( u [ c : , c - 1 ] / u [ c - 1 , c - 1 : c ] ) u [ c : , c - 1 : ] = u [ c : , c - 1 : ] - l [ c : , c - 1 ] [ : , None ] * u [ c - 1 , c - 1 : ] np . flush ( ) return ( l , u )