def kaiser(M, beta, sym=True):
 if _len_guards(M):
  return np.ones(M)
 (M, needs_trunc) = _extend(M, sym)
 n = np.arange(0, M)
 alpha = ((M - 1) / 2.0)
 w = (special.i0((beta * np.sqrt((1 - (((n - alpha) / alpha) ** 2.0))))) / special.i0(beta))
 return _truncate(w, needs_trunc)

def kaiser ( M , beta , sym = True ) : if _len_guards ( M ) : return np . ones ( M ) ( M , needs_trunc ) = _extend ( M , sym ) n = np . arange ( 0 , M ) alpha = ( ( M - 1 ) / 2.0 ) w = ( special . i0 ( ( beta * np . sqrt ( ( 1 - ( ( ( n - alpha ) / alpha ) ** 2.0 ) ) ) ) ) / special . i0 ( beta ) ) return _truncate ( w , needs_trunc )
return a kaiser window .