def cadzow(data, M, K, niter, min_var=False):
    if data.ndim == 1:
        for i in range(niter):
            data = cadzow_single(data, M, K, min_var)
        return data
    elif data.ndim == 2:
        for trace in data:
            for i in range(niter):
                trace = cadzow_single(trace, M, K, min_var)
        return data
    else:
        raise ValueError("data must be a 1D or 2D array")
Generate a consistent coloured response.
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/process/proc_lp.py/cadzow--crossover with--dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/utils/coloured_writer.py/ColouredWriter.coloured_access