#NEWLINE# def test_neg_grad_1( ) : #NEWLINE# #INDENT# npr . seed ( 8 ) #NEWLINE# for ii in xrange ( NUM_TRIALS ) : #NEWLINE# #INDENT# np_A = npr . randn ( 5 , 6 ) #NEWLINE# A = kayak . Parameter ( np_A ) #NEWLINE# C = ( - A ) #NEWLINE# D = kayak . MatSum ( C ) #NEWLINE# D . value #NEWLINE# assert ( kayak . util . checkgrad ( A , D ) < MAX_GRAD_DIFF )