docstr: Solve the lower part of a LU factorized matrix for y.
docstr_tok: ["Solve","the","lower","part","of","a","LU","factorized","matrix","for","y","."]
code: def L_solve(ctx, L, b, p=None):
      """
      Solve the lower part of a LU factorized matrix for y.
      """
      if L.rows != L.cols:
          raise RuntimeError("need n*n matrix")
      n = L.rows
      if len(b) != n:
          raise ValueError("Value should be equal to n")
      b = copy(b)
      if p:  # swap b according to p
          for k in xrange(0, len(p)):
              ctx.swap_row(b, k, p[k])
      # solve
      for i in xrange(1, n):
          for j in xrange(i):
              b[i] -= L[i, j] * b[j]
      return b
  
imports: from copy import copy
  from ..libmp.backend import xrange
label_desc: Use image node_id 2 for calling the LinearAlgebraMethods obj's underlying member method code with example usage: obj.L_solve(ctx, L, b, p) and returns: b