#NEWLINE# def test_exponential( self ) : #NEWLINE# #INDENT# degree = 5 #NEWLINE# p = approximate_taylor_polynomial ( np . exp , 0 , degree , 1 , 15 ) #NEWLINE# for i in xrange ( ( degree + 1 ) ) : #NEWLINE# #INDENT# assert_almost_equal ( p ( 0 ) , 1 ) #NEWLINE# p = p . deriv ( ) #NEWLINE# #UNINDENT# assert_almost_equal ( p ( 0 ) , 0 )