def evalTF(tf, z):
    # Original comment in deltasig:
    # In Matlab 5, the ss/freqresp() function does nearly the same thing.

    # in our case a transfer function is a scipy LTI object
    if (hasattr(tf, 'inputs') and not tf.inputs == 1) or \
       (hasattr(tf, 'outputs') and not tf.outputs == 1):
        raise TypeError("Only SISO transfer functions can be evaluated.")

    if hasattr(tf, 'num') and hasattr(tf, 'den'):
        h = np.polyval(tf.num, z) / np.polyval(tf.den, z)
    elif (hasattr(tf, 'zeros') and hasattr(tf, 'poles')):
        # LTI objects have poles and zeros
        zeros = tf.zeros
        poles = tf.poles
        k = tf.gain
        h = k*evalRPoly(zeros, z)/evalRPoly(poles, z)
    # we try not to convert the given representation to another one
    elif _is_num_den(tf):
        num, den = tf[0], tf[1]
        h = np.polyval(num, z)/np.polyval(den, z)
    elif _is_zpk(tf):
        zeros, poles, k = tf
        h = k*evalRPoly(zeros, z)/evalRPoly(poles, z)
    else:
        # ABCD and A, B, C, D will be converted through _utils
        zeros, poles, k = _get_zpk(tf)
        h = k*evalRPoly(zeros, z)/evalRPoly(poles, z)
    return h
Evaluates the rational function ``tf`` at the point(s)
dataset/ETHPy150Open ggventurini/python-deltasigma/deltasigma/_evalTF.py/evalTF