class_docstr: LU factorization.
  
  To solve Ax = b:
      solver = _LUSolver(A)
      x = solver.solve(b)
  
  optional argument `tol` on solve method is ignored but included
  to match _PCGsolver API.
class_docstr_tok: ["LU","factorization",".","To","solve","Ax","=","b",":","solver","=","_LUSolver","(","A",")","x","=","solver.solve","(","b",")","optional","argument","`","tol","`","on","solve","method","is","ignored","but","included","to","match","_PCGsolver","API","."]
code: def solve(self, B, tol=None):
      import numpy as np
  
      B = np.asarray(B)
      X = np.ndarray(B.shape, order="F")
      for j in range(B.shape[1]):
          X[:, j] = self._LU.solve(B[:, j])
      return X
  
file_path: networkx/networkx/linalg/algebraicconnectivity.py
imports: from functools import partial
  import networkx
  from networkx.utils import not_implemented_for, np_random_state, reverse_cuthill_mckee_ordering
label_desc: Use image node_id 2 for calling the _LUSolver obj's underlying member method code with example usage: obj.solve(B, tol) and returns: X