def sos2zpk(sos):
 sos = np.asarray(sos)
 n_sections = sos.shape[0]
 z = np.empty((n_sections * 2), np.complex128)
 p = np.empty((n_sections * 2), np.complex128)
 k = 1.0
 for section in range(n_sections):
  zpk = tf2zpk(sos[section, :3], sos[section, 3:])
  z[(2 * section):(2 * (section + 1))] = zpk[0]
  p[(2 * section):(2 * (section + 1))] = zpk[1]
  k *= zpk[2]
 return (z, p, k)

def sos2zpk ( sos ) : sos = np . asarray ( sos ) n_sections = sos . shape [ 0 ] z = np . empty ( ( n_sections * 2 ) , np . complex128 ) p = np . empty ( ( n_sections * 2 ) , np . complex128 ) k = 1.0 for section in range ( n_sections ) : zpk = tf2zpk ( sos [ section , : 3 ] , sos [ section , 3 : ] ) z [ ( 2 * section ) : ( 2 * ( section + 1 ) ) ] = zpk [ 0 ] p [ ( 2 * section ) : ( 2 * ( section + 1 ) ) ] = zpk [ 1 ] k *= zpk [ 2 ] return ( z , p , k )
return zeros .