def _relative_degree(z, p):
    degree = len(p) - len(z)
    if degree < 0:
        raise ValueError("Improper transfer function. "
                         "Must have at least as many poles as zeros.")
    else:
        return degree


# TODO: merge these into existing functions or make public versions
Return relative degree of transfer function from zeros and poles
dataset/ETHPy150Open scipy/scipy/scipy/signal/filter_design.py/_relative_degree