def _traverse_grid_(self):
        P, L, U = linalg.lu(self.M1)

        for j in reversed(range(self.N)):
            x1 = linalg.solve(L,
                              np.dot(self.M2,
                                     self.grid[1:self.M, j+1]))
            x2 = linalg.solve(U, x1)
            self.grid[1:self.M, j] = x2
Solve using linear systems of equations
dataset/ETHPy150Open jamesmawm/Mastering-Python-for-Finance-source-codes/B03898_04_codes/FDCnEu.py/FDCnEu._traverse_grid_