def make_D(x, order, mode):
    L = len(x) - order
    if mode == "f":
        return scipy.linalg.hankel(x[:L], x[L - 1:-1])
    elif mode == "b":
        return scipy.linalg.hankel(x[1:L + 1], x[L:])
    else:
        raise ValueError("mode must be 'f' or 'b'")
Make the LP equation D matrix (Da = d')
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/process/proc_lp.py/make_D