#NEWLINE# def test_spectral_contrast_errors( ) : #NEWLINE# #INDENT# @ raises ( librosa . ParameterError ) #NEWLINE# def __test( S , freq , fmin , n_bands , quantile ) : #NEWLINE# #INDENT# librosa . feature . spectral_contrast ( S = S , freq = freq , fmin = fmin , n_bands = n_bands , quantile = quantile ) #NEWLINE# #UNINDENT# S = np . ones ( ( 1025 , 10 ) ) #NEWLINE# ( yield ( __test , S , 0 , 200 , 6 , 0.02 ) ) #NEWLINE# ( yield ( __test , __test , np . zeros ( ( ( S . shape [ 0 ] + 1 ) , ) ) , 200 , 6 , 0.02 ) ) #NEWLINE# ( yield ( __test , S , np . zeros ( S . shape ) , 200 , 6 , 0.02 ) ) #NEWLINE# ( yield ( __test , S , None , ( - 1 ) , 6 , 0.02 ) ) #NEWLINE# ( yield ( __test , S , None , 0 , 6 , 0.02 ) ) #NEWLINE# ( yield ( __test , S , None , 200 , ( - 1 ) , 0.02 ) ) #NEWLINE# ( yield ( __test , S , None , 200 , 6 , ( - 1 ) ) ) #NEWLINE# ( yield ( __test , S , None , 200 , 6 , 2 ) )