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

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
return relative degree of transfer function from zeros and poles .