#NEWLINE# def test02( self ) : #NEWLINE# #INDENT# width = 0.04 #NEWLINE# beta = 12.0 #NEWLINE# ntaps = 401 #NEWLINE# freq = [ 0.0 , 0.5 , 0.5 , 1.0 ] #NEWLINE# gain = [ 0.0 , 0.0 , 1.0 , 1.0 ] #NEWLINE# taps = firwin2 ( ntaps , freq , gain , window = ( 'kaiser' , beta ) ) #NEWLINE# freq_samples = np . array ( [ 0.0 , 0.25 , ( 0.5 - width ) , ( 0.5 + width ) , 0.75 , 1.0 ] ) #NEWLINE# ( freqs , response ) = freqz ( taps , worN = ( np . pi * self ) ) #NEWLINE# assert_array_almost_equal ( np . abs ( response ) , [ 0.0 , 0.0 , 0.0 , 1.0 , 1.0 , 1.0 ] , decimal = 5 )