#NEWLINE# def unary_template( self , func , npfunc , npdtype , npmtype , start , stop ) : #NEWLINE# #INDENT# nelem = 50 #NEWLINE# A = np . linspace ( start , stop , nelem ) . astype ( npdtype ) #NEWLINE# B = np . empty_like ( cfunc ) #NEWLINE# arytype = npmtype [ : : 1 ] #NEWLINE# cfunc = cuda . jit ( ( arytype , arytype ) ) ( func ) #NEWLINE# cfunc [ ( 1 , nelem ) ] ( A , B ) #NEWLINE# self . assertTrue ( np . allclose ( npfunc ( A ) , B ) )