def LU(data):
        ld = data[0, :-1]
        d = data[1, :]
        ud = data[2, 1:]
        n = d.shape[0]
        for i in range(1, n):
            ld[i-1] = ld[i-1]/d[i-1]
            d[i] -= ld[i-1]*ud[i-1]