def sos2tf(sos):
 sos = np.asarray(sos)
 b = [1.0]
 a = [1.0]
 n_sections = sos.shape[0]
 for section in range(n_sections):
  b = np.polymul(b, sos[section, :3])
  a = np.polymul(a, sos[section, 3:])
 return (b, a)

def sos2tf ( sos ) : sos = np . asarray ( sos ) b = [ 1.0 ] a = [ 1.0 ] n_sections = sos . shape [ 0 ] for section in range ( n_sections ) : b = np . polymul ( b , sos [ section , : 3 ] ) a = np . polymul ( a , sos [ section , 3 : ] ) return ( b , a )
return a single transfer function from a series of second-order sections parameters sos : array_like array of second-order filter coefficients .