def besselap(N, norm='phase'):
 if (abs(int(N)) != N):
  raise ValueError('Filter order must be a nonnegative integer')
 if (N == 0):
  p = []
  k = 1
 else:
  p = (1 / _bessel_zeros(N))
  a_last = (_falling_factorial((2 * N), N) // (2 ** N))
  if (norm in ('delay', 'mag')):
   k = a_last
   if (norm == 'mag'):
    norm_factor = _norm_factor(p, k)
    p /= norm_factor
    k = ((norm_factor ** (- N)) * a_last)
  elif (norm == 'phase'):
   p *= (10 ** ((- math.log10(a_last)) / N))
   k = 1
  else:
   raise ValueError('normalization not understood')
 return (asarray([]), asarray(p, dtype=complex), float(k))

def besselap ( N , norm = 'phase' ) : if ( abs ( int ( N ) ) != N ) : raise ValueError ( 'Filter order must be a nonnegative integer' ) if ( N == 0 ) : p = [ ] k = 1 else : p = ( 1 / _bessel_zeros ( N ) ) a_last = ( _falling_factorial ( ( 2 * N ) , N ) // ( 2 ** N ) ) if ( norm in ( 'delay' , 'mag' ) ) : k = a_last if ( norm == 'mag' ) : norm_factor = _norm_factor ( p , k ) p /= norm_factor k = ( ( norm_factor ** ( - N ) ) * a_last ) elif ( norm == 'phase' ) : p *= ( 10 ** ( ( - math . log10 ( a_last ) ) / N ) ) k = 1 else : raise ValueError ( 'normalization not understood' ) return ( asarray ( [ ] ) , asarray ( p , dtype = complex ) , float ( k ) )
return for analog prototype of an nth-order bessel filter .