#NEWLINE# def timeit_2vector_theano( init , nb_element = 1000000.0 , nb_repeat = 3 , nb_call = int ( 100.0 ) , expr = 'a**2 + b**2 + 2*a*b' ) : #NEWLINE# #INDENT# t3 = timeit . Timer ( 'tf(av,bv)' , ( '\nimport theano\nimport theano.tensor as T\nimport numexpr as ne\nfrom theano.tensor import exp\n%(init)s\nav=a\nbv=b\na=T.dvector()\nb=T.dvector()\ntf= theano.function([a,b],%(expr)s)\n' % locals ( ) ) ) #NEWLINE# ret = t3 . repeat ( nb_repeat , nb_call ) #NEWLINE# return np . asarray ( ret )