#NEWLINE# def test_fft_axis( ) : #NEWLINE# #INDENT# def fun( x ) : #NEWLINE# #INDENT# return to_scalar ( np . fft . fft ( x , axis = 0 ) ) #NEWLINE# #UNINDENT# d_fun = ( lambda x : to_scalar ( grad ( fun ) ( x ) ) ) #NEWLINE# D = 5 #NEWLINE# mat = npr . randn ( d_fun , D ) #NEWLINE# check_grads ( fun , mat ) #NEWLINE# check_grads ( d_fun , mat )