#NEWLINE# def test_gradient( self ) : #NEWLINE# #INDENT# for test_offset in ( ( - 5 ) , ( - 4 ) , ( - 1 ) , 0 , 1 , 4 , 5 ) : #NEWLINE# #INDENT# def fill_diagonal_with_fix_offset( a , val ) : #NEWLINE# #INDENT# return fill_diagonal_offset ( a , val , test_offset ) #NEWLINE# #UNINDENT# utt . verify_grad ( self , [ numpy . random . rand ( 5 , 8 ) , numpy . random . rand ( ) ] , n_tests = 1 , rng = TestFillDiagonalOffset . rng ) #NEWLINE# utt . verify_grad ( fill_diagonal_with_fix_offset , [ numpy . random . rand ( 8 , 5 ) , numpy . random . rand ( ) ] , n_tests = 1 , rng = TestFillDiagonalOffset . rng ) #NEWLINE# utt . verify_grad ( fill_diagonal_with_fix_offset , [ numpy . random . rand ( 5 , 5 ) , numpy . random . rand ( ) ] , n_tests = 1 , rng = TestFillDiagonalOffset . rng )