<s> """<STR_LIT>""" <EOL> from __future__ import division <EOL> from warnings import warn <EOL> import numpy as np <EOL> from scipy . optimize import fminbound <EOL> from . _evalTF import evalTF <EOL> from . _nabsH import nabsH <EOL> def infnorm ( H ) : <EOL> """<STR_LIT>""" <EOL> N = <NUM_LIT> <EOL> w = np . linspace ( <NUM_LIT:0> , <NUM_LIT:2> * np . pi , num = N , endpoint = True ) <EOL> dw = <NUM_LIT:2> * np . pi / ( N - <NUM_LIT:1> ) <EOL> Hval = evalTF ( H , np . exp ( <NUM_LIT> * w ) ) <EOL> Hinf = np . max ( np . abs ( Hval ) ) <EOL> wi = np . where ( np . abs ( Hval ) == Hinf ) [ <NUM_LIT:0> ] <EOL> wmax = fminbound ( nabsH , w [ wi ] - dw , w [ wi ] + dw , args = ( H , ) , xtol = <NUM_LIT> , maxfun = <NUM_LIT> , full_output = <NUM_LIT:0> ) <EOL> if wmax is None : <EOL> warn ( '<STR_LIT>' <EOL> + '<STR_LIT>' ) <EOL> wmax = w [ wi ] <EOL> Hinf = - nabsH ( wmax , H ) ; <EOL> fmax = wmax / ( <NUM_LIT:2> * np . pi ) ; <EOL> return Hinf , fmax </s>
